File tree Expand file tree Collapse file tree 1 file changed +27
-17
lines changed Expand file tree Collapse file tree 1 file changed +27
-17
lines changed Original file line number Diff line number Diff line change @@ -2,47 +2,57 @@ name: GitHub Pages
22
33on :
44 push :
5- branches :
5+ branches : # TODO: Decide which branches to build
6+ - main
67 - develop
8+ - deploy-pages
9+ workflow_dispatch :
710
811jobs :
12+ # BUILD
913 build :
1014 runs-on : ubuntu-latest
1115 steps :
1216 - name : Checkout
1317 uses : actions/checkout@v4
14- # with:
15- # submodules: true
16-
18+ - name : Setup Pages
19+ uses : actions/configure-pages@v5
1720 - name : Setup Hugo
1821 uses : peaceiris/actions-hugo@v3
1922 with :
2023 hugo-version : ' 0.133.0'
21- # extended: true
22-
2324 - uses : actions/setup-node@v4
2425 with :
2526 node-version : 22
2627 cache : ' npm'
2728 cache-dependency-path : package-lock.json
28-
29-
3029 - name : Install Tools
3130 run : npm install -g postcss-cli autoprefixer
32-
3331 - name : NPM install
3432 run : |
3533 npm config set "@skymatic:registry" https://npm.pkg.github.com/
3634 npm config set '//npm.pkg.github.com/:_authToken' "${{ secrets.FONTAWESOME_AUTH_TOKEN }}"
3735 npm install
38-
3936 - name : Build
4037 run : hugo
41-
42- - name : Deploy
43- uses : peaceiris/actions-gh-pages@v4
38+ - name : Upload artifact
39+ uses : actions/upload-pages-artifact@v3
4440 with :
45- github_token : ${{ secrets.GITHUB_TOKEN }}
46- publish_dir : ./public
47- publish_branch : main
48- cname : cryptomator.org
41+ path : ' public'
42+
43+ # DEPLOY
44+ deploy :
45+ if : github.ref == 'refs/heads/main'
46+ name : Deploy to GitHub Pages
47+ runs-on : ubuntu-latest
48+ needs : [build]
49+ permissions : # Grant GITHUB_TOKEN the permissions required to make a Pages deployment
50+ pages : write # to deploy to Pages
51+ id-token : write # to verify the deployment originates from an appropriate source
52+ steps :
53+ - name : Deploy to GitHub Pages
54+ id : deployment
55+ uses : actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action
56+ environment : # Deploy to the github-pages environment
57+ name : github-pages
58+ url : ${{ steps.deployment.outputs.page_url }}
You can’t perform that action at this time.
0 commit comments