|
1 | | -name: Website |
| 1 | +name: "Deploy to GitHub Pages" |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | pull_request: |
5 | 5 | push: |
| 6 | + branches: |
| 7 | + - main |
6 | 8 | workflow_dispatch: |
7 | 9 |
|
| 10 | +# Allow this job to clone the repo and create a page deployment |
| 11 | +permissions: |
| 12 | + contents: read |
| 13 | + pages: write |
| 14 | + id-token: write |
| 15 | + |
8 | 16 | jobs: |
9 | 17 | build: |
10 | 18 | runs-on: ubuntu-latest |
11 | 19 | steps: |
12 | 20 | - name: ⬇️ Checkout |
13 | 21 | uses: actions/checkout@v4 |
14 | | - |
15 | | - - name: ⎔ Setup node |
16 | | - uses: actions/setup-node@v4 |
17 | | - with: |
18 | | - cache: npm |
19 | | - cache-dependency-path: package-lock.json |
20 | | - |
21 | | - - name: 📥 Download deps |
22 | | - run: npm ci |
23 | | - |
24 | | - - name: Run build |
25 | | - run: npm run build |
| 22 | + - name: Install, build, and upload your site |
| 23 | + uses: withastro/action@v3 |
| 24 | +` |
| 25 | + deploy: |
| 26 | + needs: build |
| 27 | + runs-on: ubuntu-latest |
| 28 | + environment: |
| 29 | + name: github-pages |
| 30 | + url: ${{ steps.deployment.outputs.page_url }} |
| 31 | + steps: |
| 32 | + - name: Deploy to GitHub Pages |
| 33 | + id: deployment |
| 34 | + uses: actions/deploy-pages@v4 |
0 commit comments