-
Notifications
You must be signed in to change notification settings - Fork 4
73 lines (60 loc) · 1.76 KB
/
build_and_release.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Build and Release Performous Website
# Controls when the workflow will run
on:
# Triggers the workflow on merges to master, release branches,
# all PRs, and release tags
push:
branches:
- master
# On anything pull request related
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build Webconv & Website
run: |
echo "Compiling webconv so we can still dynamicly make our website."
g++ webconv/webconv.cpp -o webconv/webconv
if [ -d ./web-output ]; then
rm -Rfv ./web-output
fi
mkdir -p web-output
./webconv/webconv ./htdocs-source ./web-output
cp -rp ./htdocs-binary/* ./web-output
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: web-output
path: './web-output'
deploy:
if: ${{ github.ref == 'refs/heads/master' }}
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
steps:
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: web-output
path: './web-output'
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
# Upload web-output folder
path: './web-output'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2