[ECO-555] - Test git action setup #10
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: GitHub Actions Vercel Preview Deployment | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
jobs: | |
Deploy-Preview: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Configure Git | |
run: | | |
mkdir -p ~/.ssh | |
echo "${{ secrets.ECONIA_CI_SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa | |
chmod 600 ~/.ssh/id_rsa | |
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts | |
- name: Configure pnpm | |
run: npm install -g pnpm | |
- name: Initialize Submodules | |
run: git submodule update --init --recursive | |
- name: Install Vercel CLI | |
run: | | |
cd src/frontend | |
ls | |
pnpm install | |
- name: Pull Vercel Environment Information | |
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} | |
- 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 }} | |
# - name: Deploy to Vercel | |
# uses: actions/deploy@v2 | |
# with: | |
# vercel-token: ${{ secrets.VERCEL_TOKEN }} |