-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (44 loc) · 1.38 KB
/
build.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
name: Build
run-name: Build Code
on:
workflow_dispatch:
push:
branches: ['main']
permissions:
contents: write
concurrency:
group: 'build'
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Add env vars
run: |
echo -n 'VITE_DISCORD_MESSAGE_WEBHOOK=' > .env
echo '${{ secrets.DISCORD_MESSAGE_WEBHOOK }}' | base64 | tr -d "\n\r" >> .env
echo >> .env
echo -n 'VITE_DISCORD_BLOG_WEBHOOK=' >> .env
echo '${{ secrets.DISCORD_BLOG_WEBHOOK }}' | base64 | tr -d "\n\r" >> .env
echo >> .env
echo -n 'VITE_DISCORD_COMMUNITY_WEBHOOK=' >> .env
echo '${{ secrets.DISCORD_COMMUNITY_WEBHOOK }}' | base64 | tr -d "\n\r" >> .env
echo >> .env
echo -n 'VITE_DISCORD_FEEDBACK_WEBHOOK=' >> .env
echo '${{ secrets.DISCORD_FEEDBACK_WEBHOOK }}' | base64 | tr -d "\n\r" >> .env
- name: Build App
run: |
npm ci
npm run build
cd .vitepress/dist
touch .nojekyll
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: .vitepress/dist # The folder the action should deploy.