chore: Mobile landing page changes (#168) #81
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: Deploy to zettaday (dev) | |
on: | |
# deploy runs on push of main | |
push: | |
branches: | |
- dev | |
# and can be triggered manually also | |
workflow_dispatch: | |
env: | |
ENVIRONMENT: dev | |
VITE_CLARITY_PROJECT_ID: ${{ secrets.DEV__LANDING__CLARITY_PROJECT_ID }} | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- uses: borales/[email protected] | |
with: | |
cmd: install # will run `yarn install` command | |
- uses: borales/[email protected] | |
with: | |
cmd: build # will run `yarn build` command | |
env: | |
REACT_APP_X_APP_ID: sBnL0RkWkM | |
REACT_APP_X_APP_SECRET: 21gPAwU3uOUisMJJFJjaotbDxCmvCHKMh76Xlvb8XK2RkkvZHhtSfcUfoz6QiFx8zhZf31vxvKAFD7pkdmbjHiKwoVuS2iDOLjvC | |
- uses: kefranabg/s3-sync-action@master | |
with: | |
args: --acl public-read --follow-symlinks --delete --exclude '.git/*' --exclude '.github/*' --exclude '.gitignore' --exclude 'README.md' | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.DEPLOYER__AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.DEPLOYER__SECRET_ACCESS_KEY }} | |
AWS_S3_BUCKET: ${{ secrets.DEV__LANDING__S3_BUCKET }} | |
DISTRIBUTION_ID: ${{ secrets.DEV__LANDING__DISTRIBUTION_ID }} | |
AWS_REGION: "eu-west-1" # optional: defaults to us-east-1 | |
SOURCE_DIR: "dist" | |
# Get message VARs and Notify team through discord of deployment | |
notify: | |
name: Notify | |
runs-on: ubuntu-latest | |
needs: deploy | |
steps: | |
- uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Get Repo Name | |
run: echo "REPOSITORY_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV | |
- name: "Get Latest Tag" | |
id: previoustag | |
uses: "WyriHaximus/github-action-get-previous-tag@v1" | |
- name: Set branch name | |
run: echo "BRANCH_NAME=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
# Notify Discord | |
- name: Discord notification | |
env: | |
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK__OPS_CHANNEL }} | |
uses: "Ilshidur/action-discord@0c4b27844ba47cb1c7bee539c8eead5284ce9fa9" | |
with: | |
args: "${{ env.REPOSITORY_NAME }}-${{ steps.previoustag.outputs.tag }} (${{ env.BRANCH_NAME }}) has been deployed on ${{ env.ENVIRONMENT }}." |