-
Notifications
You must be signed in to change notification settings - Fork 5
48 lines (39 loc) · 1.09 KB
/
Copy pathdeploy-docs.yml
File metadata and controls
48 lines (39 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Deploy Documentation to GitHub Pages
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 20
- name: Install yarn
run: npm install -g yarn
- name: Install dependencies
run: yarn install
- name: Build site
run: yarn build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
- name: Create Release Tag
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email 'actions@github.com'
VERSION=$(date +'%Y.%m.%d')
git tag -a "v$VERSION" -m "Documentation release v$VERSION"
git push origin "v$VERSION"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}