Skip to content

test: try deploying with nginx to test DNS #29

test: try deploying with nginx to test DNS

test: try deploying with nginx to test DNS #29

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
pull_request:
types: [opened, reopened]
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '30 15 * * *'
jobs:
deploy:
runs-on: ubuntu-latest
env:
IMAGE_TAG: github-actions-${{ github.sha }}-${{ github.run_id }}-${{github.run_attempt}}
DOCKER_REPO: registry.fly.io
APP_NAME: formsg
steps:
- name: Checkout opengovsg/FormSG into the same local dir
uses: actions/checkout@v4
with:
repository: opengovsg/FormSG
ref: refs/heads/release-al2
- name: Checkout this repo
uses: actions/checkout@v4
with:
path: demos
- name: Move demos contents into local root
run: mv demos/* .
- name: Set app version
run: |
echo "APP_VERSION=$(jq -r .version package.json)-$(echo ${GITHUB_REF##*/})-$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Setup Fly
uses: superfly/flyctl-actions/setup-flyctl@master
- name: Auth to Fly Docker
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
run: flyctl auth docker
- name: Build docker image
uses: docker/build-push-action@v5
with:
push: true
context: .
file: ./Dockerfile.demos
tags: ${{env.DOCKER_REPO}}/${{env.APP_NAME}}:${{env.APP_VERSION}}
- name: Deploy to Fly
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
run: |
flyctl deploy --ha=false --image nginx