Moved workflows folder into .github instead.

This commit is contained in:
Bob Vandevliet 2025-01-20 21:24:47 +01:00
parent 86a41f7d52
commit 54494351f4

View file

@ -10,11 +10,16 @@ on:
- 'master' - 'master'
- 'main' - 'main'
env:
IS_PUSH: ${{ github.event_name == 'push' }}
IS_MAIN: ${{ github.event.repository.default_branch == github.ref_name }}
jobs: jobs:
build: build:
name: Build and Deploy name: Build and Deploy
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
# image: ubuntu:latest
options: --volume "${{ secrets.NGINX_HTML_DIRECTORY }}:/usr/share/nginx/html:rw" options: --volume "${{ secrets.NGINX_HTML_DIRECTORY }}:/usr/share/nginx/html:rw"
steps: steps:
- -
@ -35,13 +40,13 @@ jobs:
git lfs checkout git lfs checkout
- -
name: Get Metadata name: Get Metadata
id: metadata id: meta
run: | run: |
branchName=${GITHUB_REF#refs/heads/} branchName=${GITHUB_REF#refs/heads/}
version=$(date +"%y%m.%d.%H%M%S") version=$(date +"%y%m.%d.%H%M%S")
tagName=$version tagName=$version
preRelease=false preRelease=false
if [[ "$branchName" != "master" && "$branchName" != "main" ]]; then if [[ ${{ env.IS_MAIN }} == "false" ]]; then
tagName="$tagName-$branchName" tagName="$tagName-$branchName"
preRelease=true preRelease=true
fi fi
@ -65,7 +70,7 @@ jobs:
- -
name: Append version query arg to asset URLs name: Append version query arg to asset URLs
env: env:
VERSION: ${{ steps.metadata.outputs.VERSION }} VERSION: ${{ steps.meta.outputs.VERSION }}
run: | run: |
echo "VERSION = $VERSION" echo "VERSION = $VERSION"
find public -type f -name '*.html' -exec sed -i "s/\"\([^\"?]\+\.css\)\"/\"\1?v=$VERSION\"/g" {} + find public -type f -name '*.html' -exec sed -i "s/\"\([^\"?]\+\.css\)\"/\"\1?v=$VERSION\"/g" {} +