Skip to content

Commit fd44cf6

Browse files
ci: update GitHub Actions workflow for documentation build and deployment (#618)
* ci: update GitHub Actions workflow for documentation build and deployment * same with release deployment
1 parent 70fd44b commit fd44cf6

2 files changed

Lines changed: 9 additions & 11 deletions

File tree

.github/workflows/doc.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,27 +44,27 @@ jobs:
4444
extended: true
4545

4646
- name: Build
47+
id: build_hugo
4748
run: |
4849
cd docs
4950
sed -i "s/canonifyURLs = true/canonifyURLs = false/g" hugo.toml
5051
export BRANCH_NAME=$(echo ${GITHUB_REF_NAME} | tr / -)
5152
echo "BRANCH_NAME=${BRANCH_NAME}" >> "$GITHUB_ENV"
53+
echo "branch_name=${BRANCH_NAME}" >> "$GITHUB_OUTPUT"
5254
hugo --minify --baseURL https://${BRANCH_NAME}.resticprofile.pages.dev/
5355
5456
- name: Check broken links
55-
uses: ruzickap/action-my-broken-link-checker@v2
57+
uses: ruzickap/action-my-broken-link-checker@v3
5658
with:
57-
url: "https://${{ env.BRANCH_NAME }}.resticprofile.pages.dev/"
59+
url: "https://${{ steps.build_hugo.outputs.branch_name }}.resticprofile.pages.dev/"
5860
pages_path: ./public/
5961
cmd_params: '--exclude="(linux\.die\.net|scoop\.sh|commit)" --buffer-size=8192 --max-connections-per-host=8 --rate-limit=20 --color=always --skip-tls-verification --header="User-Agent: Muffet/2.10.8" --timeout=20'
6062

6163
- name: Publish to pages.dev
6264
continue-on-error: true # secrets are not set for PRs from forks
63-
uses: cloudflare/pages-action@v1
65+
uses: cloudflare/wrangler-action@v3
6466
with:
6567
apiToken: ${{ secrets.CF_API_TOKEN }}
6668
accountId: ${{ secrets.CF_ACCOUNT_ID }}
67-
projectName: 'resticprofile'
68-
directory: 'public'
6969
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
70-
branch: ${{ github.ref_name }}
70+
command: pages deploy public --project-name=resticprofile --branch=${{ github.ref_name }}

.github/workflows/release-doc.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
cp -r ./public ./www/resticprofile
4646
4747
- name: Check broken links
48-
uses: ruzickap/action-my-broken-link-checker@v2
48+
uses: ruzickap/action-my-broken-link-checker@v3
4949
with:
5050
url: https://creativeprojects.github.io/resticprofile/
5151
pages_path: ./www/
@@ -66,11 +66,9 @@ jobs:
6666
hugo --minify --baseURL https://resticprofile.creativeprojects.tech/
6767
6868
- name: Publish to pages.dev
69-
uses: cloudflare/pages-action@v1
69+
uses: cloudflare/wrangler-action@v3
7070
with:
7171
apiToken: ${{ secrets.CF_API_TOKEN }}
7272
accountId: ${{ secrets.CF_ACCOUNT_ID }}
73-
projectName: 'resticprofile'
74-
directory: 'public'
7573
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
76-
branch: main
74+
command: pages deploy public --project-name=resticprofile --branch=main

0 commit comments

Comments
 (0)