Skip to content

Commit e23d975

Browse files
authored
Update GitHub Actions workflow for deployment
1 parent 5b819cb commit e23d975

1 file changed

Lines changed: 21 additions & 18 deletions

File tree

.github/workflows/main.yml

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,47 @@
1-
name: Deploy to GitHub Pages
1+
name: Deploy from flock main
22

33
on:
44
workflow_dispatch:
5-
schedule:
6-
- cron: '0 * * * *' # optional: auto-sync hourly
75

86
permissions:
9-
contents: write
7+
contents: read
8+
pages: write
9+
id-token: write
1010

1111
concurrency:
1212
group: "pages"
1313
cancel-in-progress: false
1414

1515
jobs:
16-
deploy:
16+
build:
1717
runs-on: ubuntu-latest
1818
steps:
19-
- name: Checkout flock main
20-
uses: actions/checkout@v4
19+
- uses: actions/checkout@v4
2120
with:
2221
repository: flipcomputing/flock
2322
ref: main
2423

25-
- name: Setup Node.js
26-
uses: actions/setup-node@v4
24+
- uses: actions/setup-node@v4
2725
with:
2826
node-version: "20"
2927
cache: "npm"
3028

31-
- name: Install dependencies
32-
run: npm ci
29+
- run: npm ci
3330

34-
- name: Build
35-
run: npm run build
31+
- run: npm run build
3632
env:
37-
NODE_ENV: production
3833
VITE_BASE_URL: "/flock-dev/"
3934

40-
- name: Deploy to GitHub Pages
41-
uses: peaceiris/actions-gh-pages@v4
35+
- uses: actions/upload-pages-artifact@v3
4236
with:
43-
github_token: ${{ secrets.GITHUB_TOKEN }}
44-
publish_dir: ./dist
37+
path: ./dist
38+
39+
deploy:
40+
needs: build
41+
runs-on: ubuntu-latest
42+
environment:
43+
name: github-pages
44+
url: ${{ steps.deployment.outputs.page_url }}
45+
steps:
46+
- uses: actions/deploy-pages@v4
47+
id: deployment

0 commit comments

Comments
 (0)