2023-05-12 14:36:29 +02:00
|
|
|
name: Build and Deploy
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
Deploy Web:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
container:
|
|
|
|
image: catthehacker/ubuntu:act-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Use Nodejs
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: 18
|
|
|
|
- run: npm install
|
|
|
|
working-directory: ./web
|
|
|
|
- run: npm run build
|
|
|
|
working-directory: ./web
|
|
|
|
|
|
|
|
- uses: docker/setup-qemu-action@v2
|
|
|
|
- uses: docker/setup-buildx-action@v2
|
|
|
|
|
|
|
|
- uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
registry: gitea.xeovalyte.dev
|
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
|
2023-05-12 14:41:28 +02:00
|
|
|
- run: docker buildx build -t gitea.xeovalyte.dev/xeovalyte/polarcraft-web:latest -f ./web/Dockerfile --load --platform=linux/amd64 .
|
2023-05-12 14:36:29 +02:00
|
|
|
- run: docker push gitea.xeovalyte.dev/xeovalyte/polarcraft-web:latest
|
|
|
|
|
|
|
|
Deploy Discord Bot:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
container:
|
|
|
|
image: catthehacker/ubuntu:act-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Use Nodejs
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: 18
|
|
|
|
- run: npm install
|
|
|
|
working-directory: ./discord-bot
|
|
|
|
|
|
|
|
- uses: docker/setup-qemu-action@v2
|
|
|
|
- uses: docker/setup-buildx-action@v2
|
|
|
|
|
|
|
|
- uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
registry: gitea.xeovalyte.dev
|
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
|
2023-05-12 14:41:28 +02:00
|
|
|
- run: docker buildx build -t gitea.xeovalyte.dev/xeovalyte/polarcraft-discord:latest -f ./discord-bot/Dockerfile --load --platform=linux/amd64 .
|
|
|
|
- run: docker push gitea.xeovalyte.dev/xeovalyte/polarcraft-discord:latest
|