Update core.json with JavaScript serialization (#505) #11
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 static pages to prod | |
on: | |
push: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
deploy-prod: | |
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: npm ci | |
- name: Generate CSV | |
run: npm run gen-csv | |
- name: Generate HTML pages | |
run: npm run gen-html | |
- name: Archive city_detail/ contents | |
run: | | |
cd city_detail | |
tar -czf ../city_details.tar.gz . | |
- name: Copy CSV 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: data/data.csv | |
target: /var/www/${{ secrets.PRN_SERVER_HOST }}/mandates-map/data.csv | |
- name: Copy city_detail/ 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: city_details.tar.gz | |
target: /var/www/${{ secrets.PRN_SERVER_HOST }}/mandates-map/city_detail | |
- name: Extract city_detail/ 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 }}/mandates-map/city_detail/city_details.tar.gz -C /var/www/${{ secrets.PRN_SERVER_HOST }}/mandates-map/city_detail | |
rm /var/www/${{ secrets.PRN_SERVER_HOST }}/mandates-map/city_detail/city_details.tar.gz |