-
-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (49 loc) · 1.48 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Deploy to GitHub pages on merge
on:
push:
branches:
- main
schedule:
- cron: "0 7 1 * *" # Every first day on every month at 7:00 AM UTC (10:00 AM Israel time).
jobs:
build_and_publish:
runs-on: ubuntu-latest
name: Publish a release to GitHub
outputs:
version: ${{ steps.release_version.outputs.version }}
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "lts/*"
- run: npm install
- run: npx nuxt generate
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./.output/public
- name: Create Release 🚀
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release
# Deployment job
deploy:
# Add a dependency to the build job
needs: build_and_publish
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github_pages environment
environment:
name: github_pages
url: ${{ steps.deployment.outputs.page_url }}
# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4