-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
63 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
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: | ||
|
||
# Note: entire jobs or sections can be disabled by adding | ||
# if: ${{ false }} to the definition column | ||
jobs: | ||
# Builds the website | ||
build_website: | ||
name: Build Performous website | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Performous Web | ||
uses: actions/checkout@v3 | ||
with: | ||
path: ${{ github.workspace }}/web | ||
repository: ${{ github.event.repository.full_name }} | ||
ref: '${{ github.event.head.ref }}' | ||
fetch-depth: 0 | ||
- name: Build Webconv & Website | ||
id: webconv | ||
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 | ||
if [[ $GITHUB_REF != "master" ]]; then | ||
echo "GH Ref $GITHUB_REF" | ||
echo "stop execution here since we're not on the master branch." | ||
else | ||
git config user.email '[email protected]' | ||
git config user.name 'Performous Website Bot' | ||
git config push.default simple | ||
git add -A | ||
git commit -am "Update website from commit $GITHUB_SHA" | ||
#git push | ||
echo "Visit https://performous.org for the update of the website." | ||
fi | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,6 @@ | |
*~ | ||
*.xcodeproj | ||
.vs | ||
web | ||
webconv/webconv | ||
webconv/webconv | ||
web-output | ||
!build_and_release.yml |