Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
LandOfTheRair/.github/workflows/manual-deploy-server.yml
View runs Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
73 lines (56 sloc)
1.9 KB
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: Manual Deploy (Server Only) | |
on: workflow_dispatch | |
jobs: | |
build: | |
name: Manual Deploy (Server Only) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
# os: [macos-latest, ubuntu-latest, windows-latest] | |
os: [ubuntu-latest] | |
node-version: [16.12.x] | |
steps: | |
- name: Reboot Notification | |
uses: fjogeleit/http-request-action@master | |
with: | |
url: 'https://server.rair.land/reboot/start' | |
method: 'POST' | |
data: '{ "secret": "${{ secrets.WEBHOOK_SECRET }}" }' | |
preventFailureOnNoResponse: 'true' | |
ignoreStatusCodes: '404,502' | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install caprover | |
run: npm install -g caprover | |
- run: npm install | |
- run: cd server && npm run setup | |
- run: cd server && npm run lint | |
- run: cd server && npm run build | |
- name: Kick And Save Players | |
uses: fjogeleit/http-request-action@master | |
with: | |
url: 'https://server.rair.land/reboot/lockgame' | |
method: 'POST' | |
data: '{ "secret": "${{ secrets.WEBHOOK_SECRET }}" }' | |
preventFailureOnNoResponse: 'true' | |
ignoreStatusCodes: '404,502' | |
- name: Wait 30 seconds | |
uses: jakejarvis/wait-action@master | |
with: | |
time: '30s' | |
- name: Caprover Deploy | |
run: caprover deploy -h 'https://captain.server.rair.land' -p '${{ secrets.CAPROVER_PASSWORD }}' -b 'master' -a 'game' | |
- name: Wait 30 seconds | |
uses: jakejarvis/wait-action@master | |
with: | |
time: '30s' | |
- name: Reboot Done | |
uses: fjogeleit/http-request-action@master | |
with: | |
url: 'https://server.rair.land/reboot/done' | |
method: 'POST' | |
data: '{ "secret": "${{ secrets.WEBHOOK_SECRET }}" }' | |
preventFailureOnNoResponse: 'true' |