From d32c01362ed2616c72ca6df8b9f804b28547437c Mon Sep 17 00:00:00 2001 From: Arjan Speiard | Asgard Sings! Date: Sun, 6 Aug 2023 16:33:47 +0200 Subject: [PATCH] Moved to GH-Actions. --- .github/workflows/build_and_release.yml | 75 +++++++++++++++++++++++++ .gitignore | 5 +- 2 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/build_and_release.yml diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml new file mode 100644 index 0000000..85faaf9 --- /dev/null +++ b/.github/workflows/build_and_release.yml @@ -0,0 +1,75 @@ +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: | + 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 + \ No newline at end of file diff --git a/.gitignore b/.gitignore index 84fc088..e76b0fb 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,6 @@ *~ *.xcodeproj .vs -web -webconv/webconv \ No newline at end of file +webconv/webconv +web-output +!build_and_release.yml \ No newline at end of file