Skip to content

Commit

Permalink
Moved to GH-Actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Baklap4 committed Aug 6, 2023
1 parent 54877af commit 8d17435
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 2 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/build_and_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
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:

jobs:
# Single deploy job since we're just deploying
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build Webconv & Website
run: |
ls -la
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:
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: 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

5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
*~
*.xcodeproj
.vs
web
webconv/webconv
webconv/webconv
web-output
!build_and_release.yml

0 comments on commit 8d17435

Please sign in to comment.