Feature/gh actions #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Release Performous | |
# Controls when the workflow will run | |
on: | |
# Run on a schedule to get weekly updates for the Linux containers | |
# and keep the cache fresh for Windows builds. Runs Sundays at midnight. | |
schedule: | |
- cron: "0 0 * * 0" | |
# 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: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
# Single deploy job since we're just deploying | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Build Webconv & Website | |
run: | | |
cd web | |
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-pages-artifact@v2 | |
with: | |
# Upload web-output folder | |
path: './web-output' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
if: ${{ github.ref == 'refs/heads/master' }} | |
uses: actions/deploy-pages@v2 | |