Skip to content

Commit a8bb11f

Browse files
Merge branch 'feature/deploy-pages' into develop
2 parents 0e30843 + 175f1e9 commit a8bb11f

File tree

1 file changed

+27
-20
lines changed

1 file changed

+27
-20
lines changed

.github/workflows/gh-pages.yml

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,54 @@ name: GitHub Pages
22

33
on:
44
push:
5-
branches:
6-
- develop
75

86
jobs:
7+
# BUILD
98
build:
109
runs-on: ubuntu-latest
1110
steps:
1211
- name: Checkout
1312
uses: actions/checkout@v4
14-
# with:
15-
# submodules: true
16-
13+
- name: Setup Pages
14+
uses: actions/configure-pages@v5
1715
- name: Setup Hugo
1816
uses: peaceiris/actions-hugo@v3
1917
with:
2018
hugo-version: '0.133.0'
21-
# extended: true
22-
2319
- uses: actions/setup-node@v4
2420
with:
2521
node-version: 22
2622
cache: 'npm'
2723
cache-dependency-path: package-lock.json
28-
29-
24+
registry-url: 'https://npm.pkg.github.com/'
3025
- name: Install Tools
3126
run: npm install -g postcss-cli autoprefixer
32-
3327
- name: NPM install
3428
run: |
3529
npm config set "@skymatic:registry" https://npm.pkg.github.com/
36-
npm config set '//npm.pkg.github.com/:_authToken' "${{ secrets.FONTAWESOME_AUTH_TOKEN }}"
37-
npm install
38-
30+
npm ci --ignore-scripts
31+
env:
32+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3933
- name: Build
4034
run: hugo
41-
42-
- name: Deploy
43-
uses: peaceiris/actions-gh-pages@v4
35+
- name: Upload artifact
36+
uses: actions/upload-pages-artifact@v3
4437
with:
45-
github_token: ${{ secrets.GITHUB_TOKEN }}
46-
publish_dir: ./public
47-
publish_branch: main
48-
cname: cryptomator.org
38+
path: 'public'
39+
40+
# DEPLOY
41+
deploy:
42+
if: github.ref == 'refs/heads/main'
43+
name: Deploy to GitHub Pages
44+
runs-on: ubuntu-latest
45+
needs: [build]
46+
permissions: # Grant GITHUB_TOKEN the permissions required to make a Pages deployment
47+
pages: write # to deploy to Pages
48+
id-token: write # to verify the deployment originates from an appropriate source
49+
steps:
50+
- name: Deploy to GitHub Pages
51+
id: deployment
52+
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action
53+
environment: # Deploy to the github-pages environment
54+
name: github-pages
55+
url: ${{ steps.deployment.outputs.page_url }}

0 commit comments

Comments
 (0)