Skip to content

Commit 54dab9d

Browse files
authored
Merge pull request #377 from janekmi/replace_deploy
common: replace the deployment action since the current one does not allow increasing the timeout
2 parents eedc49c + 0b51f09 commit 54dab9d

File tree

1 file changed

+28
-8
lines changed

1 file changed

+28
-8
lines changed

.github/workflows/gh-pages.yml

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,22 @@ on:
66
- main # Set a branch to deploy
77
pull_request:
88

9+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
16+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
17+
concurrency:
18+
group: "pages"
19+
cancel-in-progress: false
20+
921
jobs:
10-
deploy:
22+
# Build job
23+
build:
1124
runs-on: ubuntu-20.04
12-
concurrency:
13-
group: ${{ github.workflow }}-${{ github.ref }}
1425
steps:
1526
- uses: actions/checkout@v2
1627
with:
@@ -26,10 +37,19 @@ jobs:
2637
- name: Build
2738
run: hugo --minify
2839

29-
- name: Deploy
30-
uses: peaceiris/actions-gh-pages@v3
31-
if: ${{ github.ref == 'refs/heads/main' }}
40+
- name: Upload artifact
41+
uses: actions/upload-pages-artifact@v2
3242
with:
33-
github_token: ${{ secrets.GITHUB_TOKEN }}
34-
publish_dir: ./public
43+
path: ./public
3544

45+
# Deployment job
46+
deploy:
47+
environment:
48+
name: github-pages
49+
url: ${{ steps.deployment.outputs.page_url }}
50+
runs-on: ubuntu-latest
51+
needs: build
52+
steps:
53+
- name: Deploy to GitHub Pages
54+
id: deployment
55+
uses: actions/deploy-pages@v2

0 commit comments

Comments
 (0)