feat: page apbdesa #41
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: Vercel Production Deployment | |
env: | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
on: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: '0 0 1 * *' | |
jobs: | |
Deploy-Production: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- uses: pnpm/action-setup@v3 | |
name: Install pnpm | |
with: | |
version: 8 | |
run_install: false | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- name: Install Vercel CLI | |
run: pnpm i -g vercel@latest | |
- name: Install Project Dev Dependencies | |
run: pnpm install --dev --frozen-lockfile | |
- name: Push files | |
uses: SamKirkland/[email protected] | |
with: | |
server: ${{ secrets.PROXY_BACKEND_FTP_URL }} | |
username: ${{ secrets.PROXY_BACKEND_FTP_USERNAME }} | |
password: ${{ secrets.PROXY_BACKEND_FTP_PASSWORD }} | |
protocol: ftps | |
local-dir: ./backend/proxy/ | |
- name: Fetch Data from External API | |
run: pnpm run fetchdata | |
- name: Pull Vercel Environment Information | |
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Deploy Project Artifacts to Vercel | |
run: vercel deploy --prod --token=${{ secrets.VERCEL_TOKEN }} |