Skip to content

Create an auto-deploy file #34

Create an auto-deploy file

Create an auto-deploy file #34

Workflow file for this run

on:
workflow_dispatch:
jobs:
oryx_build_job:
runs-on: ubuntu-latest
name: Oryx build
steps:
# To use this repository's private action,
# you must check out the repository
- name: Checkout
uses: actions/checkout@v3
- name: Install Azure-cli
uses: elstudio/action-install-azure-cli@v1
- name: Log into registry
uses: azure/login@v1
with:
creds: '${{ secrets.AZURE_CREDENTIALS }}'
- name: Log in to Azure Container Registry
uses: docker/login-action@v2.0.0
with:
registry: jamstacktest.azurecr.io
username: ${{ secrets.AZURE_CLIENT_ID }}
password: ${{ secrets.AZURE_CLIENT_SECRET }}
- name: Oryx build step
uses: ./ # Uses an action in the root directory
id: oryx-build
with:
app-location: "Client"
Deploy-preview-Vercel:
runs-on: ubuntu-latest
name: Deploy to Vercel
steps:
- name: Install vercel CLI
run: npm install --global vercel@latest
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
- name: Change directory
- name: Build Project Artifacts
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
Deploy-Netlify:
runs-on: ubuntu-latest
name : Deploy to Netlify
steps:
- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v1.2
with:
publish-dir: './Client'
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy from GitHub Actions"
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1