This repository has been archived by the owner on Aug 22, 2024. It is now read-only.
Try step var #8
Workflow file for this run
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: Build and Deploy Sites | ||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
pull_request: | ||
branches: | ||
- 'master' | ||
jobs: | ||
build-brandonb_ca: | ||
name: Build and Deploy brandonb.ca | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: .awspublish-brandonb-web-media | ||
key: ${{ runner.os }}-awspublish-cache-${{ hashFiles('**/.awspublish-brandonb-web-media') }} | ||
restore-keys: | | ||
${{ runner.os }}-awspublish-cache- | ||
- name: Setup Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3' | ||
bundler-cache: true | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'npm' | ||
- name: Install ruby dependencies | ||
run: gem install bundler && bundle install | ||
- name: Install js dependencies | ||
run: npm ci | ||
- name: Build and deploy | ||
run: npm run brandonb.ca:deploy | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }} | ||
- uses: sarisia/actions-status-discord@v1 | ||
if: success() | ||
with: | ||
webhook: ${{ secrets.DISCORD_WEBHOOK }} | ||
title: "deploy" | ||
description: "Successfully deployed brandonb.ca `${{ github.sha }}`\nSee [build log](${{ BUILD_URL }})" | ||
Check failure on line 54 in .github/workflows/build-and-deploy.yml
|
||
color: 0x28a745 | ||
env: | ||
BUILD_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | ||
- uses: sarisia/actions-status-discord@v1 | ||
if: failure() | ||
with: | ||
webhook: ${{ secrets.DISCORD_WEBHOOK }} | ||
title: "deploy" | ||
description: "Failed to deploy brandonb.ca `${{ github.sha }}`\nSee [build log](${{ BUILD_URL }})" | ||
color: 0xdc3545 | ||
env: | ||
BUILD_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" |