v0.4.8: Added Mirabilandia, moved Bobbejaanland, improved Movie Park … #65
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 | |
on: | |
push: | |
branches: | |
- master | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 1 | |
fail-fast: false | |
matrix: | |
node-version: [ 16.16 ] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Copy .env file | |
run: 'echo "$ENV_FILE" > ./.env' | |
shell: bash | |
env: | |
ENV_FILE: ${{ secrets.CICD_ENV_FILE }} | |
- run: npm ci | |
- run: npm test | |
deploy: | |
runs-on: ubuntu-latest | |
needs: | |
- test | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js 16 | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
- name: Copy .env file | |
run: 'echo "$ENV_FILE" > ./.env' | |
shell: bash | |
env: | |
ENV_FILE: ${{ secrets.PRODUCTION_ENV_FILE }} | |
- name: Install NPM packages | |
run: npm ci | |
- name: Build | |
run: npm run build | |
- name: Install SSH key | |
uses: shimataro/ssh-key-action@v2 | |
with: | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
known_hosts: 'just-a-placeholder-so-we-dont-get-errors' | |
- name: Add Server To Known Hosts | |
run: ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts | |
- name: Publish files | |
run: scp -r dist/* ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }}:/var/www/tp.arendz.nl/dist | |
- name: Restart Themeparks Server | |
run: ssh ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} pm2 reload themeparkplanner-api |