Skip to content

Commit 45b231c

Browse files
committed
update deploy to github workflow
1 parent a039363 commit 45b231c

File tree

1 file changed

+25
-19
lines changed

1 file changed

+25
-19
lines changed
+25-19
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,31 @@
1-
name: Build and Deploy to GitHub pages
1+
name: Deploy to GitHub Pages
2+
23
on:
34
push:
4-
branches:
5-
- source
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
613
jobs:
7-
build-and-deploy:
14+
build:
815
runs-on: ubuntu-latest
916
steps:
10-
- name: Checkout 🛎️
11-
uses: actions/checkout@v2.3.1 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly.
12-
with:
13-
persist-credentials: false
17+
- name: Checkout your repository using git
18+
uses: actions/checkout@v4
19+
- name: Install, build, and upload your site output
20+
uses: withastro/action@v2
1421

15-
- name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
16-
run: |
17-
yarn
18-
yarn build
19-
20-
- name: Deploy 🚀
21-
uses: JamesIves/[email protected]
22-
with:
23-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24-
BRANCH: master
25-
FOLDER: build
22+
deploy:
23+
needs: build
24+
runs-on: ubuntu-latest
25+
environment:
26+
name: github-pages
27+
url: ${{ steps.deployment.outputs.page_url }}
28+
steps:
29+
- name: Deploy to GitHub Pages
30+
id: deployment
31+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)