Skip to content

Use flexbox for scorecard header (#207) #104

Use flexbox for scorecard header (#207)

Use flexbox for scorecard header (#207) #104

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@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: |
npm ci
npx playwright install --with-deps
- name: Build
run: npm run build
- name: Run tests on dist/
run: npm run test-dist
- name: Archive dist/ contents
run: |
cd 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