-
Notifications
You must be signed in to change notification settings - Fork 16
60 lines (48 loc) · 1.55 KB
/
deploy.yaml
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
58
59
60
name: Deploy to GitHub Pages
# This workflow is triggered on a push to the 'main' branch
on:
push:
branches:
- main
# Also allows for manual deployment
workflow_dispatch:
# Allow this job to clone the repo and create a page deployment
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
# Run the job on the latest Ubuntu environment
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the repository code
- name: Checkout code
uses: actions/checkout@v2
# Step 2: Set up Node.js version 20.30
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20.3.0'
# Step 3: Set up Deno
- name: Set up Deno
uses: denoland/setup-deno@v1
with:
deno-version: v2.0.0
# Step 3: Install dependencies from package.json
- name: Install dependencies
run: npm install
# Step 4: Print Git logs for debugging
- name: Print Git Log
run: git log --oneline -10 # Show the last 10 commits for debug purposes
# Step 5: Build the Astro site (output will be in the 'dist' directory)
- name: Build Astro site
run: |
deno --version
npm run astro build
# Step 6: Deploy to GitHub Pages using the 'dist' directory
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.SURVEILR_GITHUB_TOKEN }}
publish_dir: ./dist