Skip to content

Commit 53f45a2

Browse files
committed
chore: update deploy
1 parent 51e3019 commit 53f45a2

1 file changed

Lines changed: 27 additions & 7 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ on:
55
branches:
66
- main
77

8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: true
16+
817
jobs:
918
build:
1019
runs-on: ubuntu-latest
@@ -30,11 +39,22 @@ jobs:
3039
- name: Build project
3140
run: pnpm run build
3241

33-
- name: Deploy to GitHub Pages
34-
uses: crazy-max/ghaction-github-pages@v4
42+
- name: Generate CNAME file
43+
run: echo "md-pages.doocs.org" > .output/public/CNAME
44+
45+
- name: Upload artifact
46+
uses: actions/upload-pages-artifact@v2
3547
with:
36-
target_branch: gh-pages
37-
build_dir: .output/public
38-
fqdn: md-pages.doocs.org
39-
env:
40-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
path: .output/public
49+
50+
deploy:
51+
needs: build
52+
runs-on: ubuntu-latest
53+
environment:
54+
name: github-pages
55+
url: ${{ steps.deployment.outputs.page_url }}
56+
57+
steps:
58+
- name: Deploy to GitHub Pages
59+
id: deployment
60+
uses: actions/deploy-pages@v2

0 commit comments

Comments
 (0)