1- name : Vuepress Build and Deploy
1+ name : Build and Deploy
22on :
33 workflow_dispatch :
44 push :
5- branches :
6- - main
7- paths :
8- - docs/**
5+ branch : main
6+
97jobs :
10- build-and-deploy :
8+ build :
119 runs-on : ubuntu-latest
1210 steps :
1311 - name : Checkout
14- uses : actions/checkout@v3
12+ uses : actions/checkout@v6
13+
14+ - name : Setup Node
15+ uses : actions/setup-node@v6
1516
16- - name : vuepress-build-and-deploy
17- uses : jenkey2011/vuepress-deploy@master
18- env :
19- # The access token will eventually expire and need to be updated.
20- # When the token expires the following error will occur during deployment:
21- # remote: Invalid username or password.
22- # fatal: Authentication failed for '***github.com/Open-UAS/Open-UAS.github.io.git/'
23- #
24- # See the readme for jenkey2011/vuepress for instructions on how to create a new access token and add it to the Open-UAS/Open-UAS.github.io repo.
25- # https://github.com/jenkey2011/vuepress-deploy#create-a-personal-access-token
26- # NOTE: To add an access token you must be an Owner of the repo.
27- ACCESS_TOKEN : ${{ secrets.VARAD_ACCESS_TOKEN }}
28- TARGET_REPO : Open-UAS/Open-UAS.github.io
29- TARGET_BRANCH : gh-pages
30- BUILD_SCRIPT : npm install && npm run build
31- BUILD_DIR : docs/.vuepress/dist
32- # CNAME: https://www.xxx.com
17+ - name : Install dependencies
18+ run : npm install
19+
20+ - name : Build website
21+ run : npm run build
22+
23+ - name : Upload artifact
24+ uses : actions/upload-pages-artifact@v4
25+ with :
26+ name : dist
27+ path : docs/.vuepress/dist
28+
29+ deploy-github-pages :
30+ if : ${{ github.ref == 'refs/heads/main' }}
31+ name : Deploy to GitHub Pages
32+ runs-on : ubuntu-latest
33+ needs : build
34+ environment :
35+ name : Production
36+ url : ${{ steps.deployment.outputs.page_url }}
0 commit comments