This repository has been archived by the owner on Mar 23, 2024. It is now read-only.
Deploy to Vercel #9
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 Vercel | |
on: | |
workflow_dispatch: | |
workflow_run: | |
workflows: [frontend CI, Server CI] | |
types: [completed] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: List contents of client_artifact directory | |
run: ls -la | |
- name: List contents of server_artifact directory | |
run: ls -la | |
- name: Download client artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: client-success-artifact | |
path: client_artifact | |
continue-on-error: true | |
- name: Download server artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: server-success-artifact | |
path: server_artifact | |
continue-on-error: true | |
- name: Check artifacts | |
run: | | |
if [ ! -f client_artifact/client_success.txt ] || [ ! -f server_artifact/server_success.txt ]; then | |
echo "One or both workflows did not succeed. Skipping deployment." | |
exit 1 | |
fi | |
- name: Deploy to Vercel | |
uses: amondnet/vercel-action@v19 | |
with: | |
vercel-token: ${{ secrets.VERCEL_TOKEN }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} |