added brain and added animation to ball #156
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: Docker Build | |
on: | |
push: | |
paths: | |
- '**.js' | |
- '**.json' | |
- '**.lock' | |
- '**.md' | |
- '**.ts' | |
- '**.tsx' | |
- '**.yml' | |
- '.github/workflows/docker-publish-web.yml' | |
- 'Website/Dockerfile' | |
- '**.json' | |
branches: [ main, ci-test , feature/ui-revamp ] | |
env: | |
IMAGE_NAME: website | |
jobs: | |
build-website: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build image | |
run: docker build . --build-arg VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') --file Dockerfile --tag $IMAGE_NAME | |
working-directory: ./ui | |
- name: Log into registry | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin | |
working-directory: ./ui | |
- name: Push image | |
run: | | |
IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME | |
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') | |
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') | |
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') | |
echo IMAGE_ID=$IMAGE_ID | |
echo VERSION=$VERSION | |
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION | |
docker tag $IMAGE_NAME $IMAGE_ID:latest | |
docker push --all-tags $IMAGE_ID | |
working-directory: ./ui | |
deploy-and-purge: | |
needs: | |
- build-website | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy | |
uses: fjogeleit/http-request-action@v1 | |
with: | |
url: 'https://watchtower.montague.im/v1/update' | |
method: 'POST' | |
timeout: 60000 | |
customHeaders: '{"Authorization": "Bearer ${{ secrets.TOKEN }}"}' | |
# - name: Purge Cloudflare Cache | |
# uses: fjogeleit/http-request-action@v1 | |
# with: | |
# url: 'https://api.cloudflare.com/client/v4/zones/${{ secrets.CF_ZONE }}/purge_cache' | |
# method: 'POST' | |
# timeout: 60000 | |
# customHeaders: '{"Authorization": "Bearer ${{ secrets.CF_TOKEN }}"}' | |
# data: '{"purge_everything":true}' | |