Tubaleviao is testing out GitHub Actions π #9
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 production | |
run-name: ${{ github.actor }} is testing out GitHub Actions π | |
on: [push] | |
jobs: | |
Explore-GitHub-Actions: | |
runs-on: ubuntu-latest | |
steps: | |
- run: echo "π The job was triggered by a ${{ github.event_name }} event." | |
- run: echo "π§ Running on a ${{ runner.os }} server hosted by GitHub!" | |
- run: echo "π repo ${{ github.repository }} / branch ${{ github.ref }}" | |
# - name: Check out repository code | |
# uses: actions/checkout@v4 | |
# - run: cd ${{ github.workspace }} | |
- run: echo "π This job's status is ${{ job.status }}." | |
# - run: echo $'PROD=\nPORT=3000\nSESSION_SECRET="some secret words"\nMONGO_HOST=void-wfsmn.mongodb.net\nMONGO_USER=alvro\nMONGO_PASS=thisissecret\nMONGO_DB=test\nMONGO_PROTOCOL="mongodb+srv"\nMONGO_OPTIONS="?retryWrites=true&w=majority"\nJWT_KEY="some other secret words"\n' > .env | |
# - run: npm install | |
# - run: npm test | |
# - run: pwd # /home/runner/work/tuba.work/tuba.work | |
- run: mkdir ~/.ssh | |
- run: echo "${{ secrets.SSH_PRIV_KEY }}" >> ~/.ssh/id_ed25519 | |
- run: echo "${{ secrets.SSH_PUB }}" >> ~/.ssh/id_ed25519.pub | |
- run: chmod 600 ~/.ssh/id_ed25519 | |
- run: ssh -tt -p ${{ secrets.SSH_PORT }} ${{ secrets.SSH_USER }}@tuba.work | |
- run: podman stop schwifty-pod | |
- run: podman --cgroup-manager cgroupfs build . -t schwifty" | |
- run: podman run -ti --network shared -v ./public:/opt/app/public/ -d -p 80:80 --name schwifty-pod schwifty" |