-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (63 loc) · 1.59 KB
/
build-and-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
61
62
63
64
65
66
67
name: Build and Deploy Website
on:
workflow_dispatch:
push:
branches: [ "main" ]
jobs:
build-blog:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: './package-lock.json'
- name: Install Dependencies
run: npm install
- name: Build Blog
run: npm run build
- name: Show files
shell: bash
run: |
ls -al
ls -al build
ls -al build/blog
touch build/.nojekyll
touch build/blog/.nojekyll
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: manic.so
path: build/*
upload-to-github-pages:
needs: [build-blog]
runs-on: ubuntu-latest
steps:
- name: Download Build Artifacts
uses: actions/download-artifact@v4
with:
path: github-pages
merge-multiple: true
seperate-directories: false
delete-merged: true
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v3
with:
name: github-pages
path: github-pages
deploy-to-github-pages:
needs: upload-to-github-pages
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4