Skip to content

Commit ff78363

Browse files
Update GA workflow
1 parent 20b9493 commit ff78363

File tree

1 file changed

+23
-9
lines changed

1 file changed

+23
-9
lines changed

.github/workflows/deploy.yml

+23-9
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,30 @@ on:
55
branches: [main]
66

77
jobs:
8-
gh-pages:
9-
runs-on: macOS-latest
8+
build:
9+
runs-on: ubuntu-latest
1010

1111
steps:
12-
- uses: actions/checkout@v1
13-
12+
- uses: actions/checkout@v4
13+
- uses: swift-actions/setup-swift@v1
14+
with:
15+
swift-version: '5.9'
1416
- run: swift run SwiftWasmBlog
15-
16-
- name: Deploy
17-
uses: peaceiris/actions-gh-pages@v3
17+
- uses: actions/upload-pages-artifact@v3
1818
with:
19-
github_token: ${{ secrets.GITHUB_TOKEN }}
20-
publish_dir: ./Output
19+
path: dist
20+
21+
deploy:
22+
runs-on: ubuntu-latest
23+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
24+
needs: build
25+
permissions:
26+
pages: write
27+
id-token: write
28+
29+
environment:
30+
name: github-pages
31+
url: ${{ steps.deployment.outputs.page_url }}
32+
steps:
33+
- uses: actions/deploy-pages@v4
34+
id: deployment

0 commit comments

Comments
 (0)