neko/.github/workflows/deploy.yml

45 lines
1.1 KiB
YAML
Raw Normal View History

2020-04-19 13:29:57 +12:00
name: deploy
2020-04-19 08:57:39 +12:00
on:
push:
branches: [ master ]
2020-04-19 13:29:57 +12:00
paths:
- 'client/**'
- 'server/**'
2020-04-19 08:57:39 +12:00
jobs:
2020-04-19 13:12:49 +12:00
deploy:
name: Deploy
2020-04-19 09:22:50 +12:00
runs-on: ubuntu-latest
2020-04-19 12:06:02 +12:00
container: nurdism/neko:dev
2020-04-19 08:57:39 +12:00
steps:
- name: Check out code
uses: actions/checkout@v2
2020-04-19 12:06:02 +12:00
- name: Fetch unshallow
run: git fetch --prune --tags --unshallow
2020-04-19 08:57:39 +12:00
- name: Get go dependencies and build server
working-directory: server
2020-04-19 13:12:49 +12:00
run: |
go get -v -t -d .
./build
2020-04-19 08:57:39 +12:00
- name: Get npm dependencies and build Client
working-directory: client
2020-04-19 13:12:49 +12:00
run: |
npm install
npm run build
2020-04-19 08:57:39 +12:00
- name: Build the base image
run: docker build -f ./.docker/files/base/Dockerfile -t nurdism/neko:base .
2020-04-19 12:06:02 +12:00
- name: Build the latest image
run: docker build -f ./.docker/files/firefox/Dockerfile -t nurdism/neko:latest .
2020-04-19 08:57:39 +12:00
- name: Push the Docker images
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login ${{ secrets.DOCKER_REGISTRY_URL }} -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
docker push nurdism/neko:base
docker push nurdism/neko:latest