Skip to content

Commit d1a22ee

Browse files
committed
Update workflow of deploy
1 parent a82a17e commit d1a22ee

File tree

2 files changed

+22
-56
lines changed

2 files changed

+22
-56
lines changed

.github/workflows/deploy.yml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@ on:
55
branches: [main, master]
66

77
permissions:
8-
contents: write
8+
contents: read
9+
pages: write
10+
id-token: write
911

10-
concurrency: ci-${{ github.ref }}
12+
concurrency:
13+
group: "pages"
14+
cancel-in-progress: false
1115

1216
jobs:
13-
build-and-deploy:
14-
name: Build and Deploy
17+
build:
18+
name: Build
1519
runs-on: ubuntu-latest
1620
steps:
1721
- name: Checkout Code
@@ -27,8 +31,18 @@ jobs:
2731
with:
2832
base-url: /
2933

30-
- name: Deploy
31-
uses: JamesIves/github-pages-deploy-action@v4
34+
- name: Upload artifact
35+
uses: actions/upload-pages-artifact@v1
3236
with:
33-
clean-exclude: pr-preview/
34-
folder: build
37+
path: build
38+
39+
deploy:
40+
environment:
41+
name: github-pages
42+
url: ${{ steps.deployment.outputs.page_url }}
43+
runs-on: ubuntu-latest
44+
needs: build
45+
steps:
46+
- name: Deploy to GitHub Pages
47+
id: deployment
48+
uses: actions/deploy-pages@v2

.github/workflows/preview.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)