Skip to content

Commit 24c00eb

Browse files
committed
Switch to actions/deploy-pages for deployment
This means we no longer commit the results, but push them directly to GH. This also means we can go back to using "main" for the source.
1 parent fadf5d1 commit 24c00eb

File tree

1 file changed

+12
-21
lines changed

1 file changed

+12
-21
lines changed

.github/workflows/main.yml

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ on:
44
workflow_dispatch:
55
pull_request:
66
push:
7-
branches-ignore:
8-
- main
97

108
jobs:
119
build:
@@ -38,30 +36,23 @@ jobs:
3836
3937
- run: poetry run mkdocs build
4038

41-
- name: Upload Results
42-
uses: actions/upload-artifact@v4
39+
- name: Upload for pages
40+
uses: actions/upload-pages-artifact@v3
4341
with:
44-
name: website
4542
path: ./site
4643

4744
deploy:
48-
runs-on: ubuntu-22.04
45+
environment:
46+
name: github-pages
47+
url: ${{ steps.deployment.outputs.page_url }}
48+
runs-on: ubuntu-latest
4949
needs: build
5050
concurrency: ci-${{ github.ref }}
5151
permissions:
52-
contents: write
53-
if: github.repository != 'msys2/msys2.github.io' || (github.event_name != 'pull_request' && github.ref == 'refs/heads/source')
52+
pages: write
53+
id-token: write
54+
if: github.repository != 'msys2/msys2.github.io' || (github.event_name != 'pull_request' && github.ref == 'refs/heads/main')
5455
steps:
55-
- name: Download Results
56-
uses: actions/download-artifact@v4
57-
with:
58-
name: website
59-
path: ./site
60-
61-
- name: Deploy
62-
uses: peaceiris/actions-gh-pages@v3
63-
with:
64-
github_token: ${{ secrets.GITHUB_TOKEN }}
65-
publish_dir: ./site
66-
publish_branch: main
67-
cname: www.msys2.org
56+
- name: Deploy to GitHub Pages
57+
id: deployment
58+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)