Add basic Connecticut map (#296) #190
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 staging | |
on: | |
push: | |
branches: [main] | |
jobs: | |
deploy_staging: | |
if: github.repository_owner == 'ParkingReformNetwork' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install dependencies | |
run: | | |
corepack enable pnpm | |
pnpm install | |
npx playwright install --with-deps | |
- name: Build | |
run: pnpm -F primary build | |
- name: Run tests on dist/ | |
run: pnpm -F primary test-dist | |
- name: Archive dist/ contents | |
run: | | |
cd packages/primary/dist | |
tar -czf ../../../dist_contents.tar.gz * | |
- name: Copy dist/ to server | |
uses: appleboy/scp-action@master | |
with: | |
host: ${{ secrets.PRN_FTP_HOST }} | |
username: ${{ secrets.PRN_SERVER_USERNAME }} | |
key: ${{ secrets.PRN_SERVER_PRIVATE_KEY }} | |
source: dist_contents.tar.gz | |
target: /var/www/${{ secrets.PRN_SERVER_HOST }}/plm-staging | |
- name: Extract on server | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.PRN_FTP_HOST }} | |
username: ${{ secrets.PRN_SERVER_USERNAME }} | |
key: ${{ secrets.PRN_SERVER_PRIVATE_KEY }} | |
script: | | |
tar -xzf /var/www/${{ secrets.PRN_SERVER_HOST }}/plm-staging/dist_contents.tar.gz -C /var/www/${{ secrets.PRN_SERVER_HOST }}/plm-staging | |
rm /var/www/${{ secrets.PRN_SERVER_HOST }}/plm-staging/dist_contents.tar.gz |