livereload-basic-v2.1.2 #2
Workflow file for this run
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 Environment | |
on: | |
release: | |
types: [published] | |
jobs: | |
deploy-client: | |
name: Build and Export Client | |
if: github.event.release.target_commitish == 'master' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.release.tag_name }} | |
- name: List files for publish | |
run: cd public && ls -l -a | |
- name: Deploy to Github Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: public | |
publish_branch: gh-pages | |
docker-build-push-tag: | |
name: Push Tagged Image | |
if: github.event.release.target_commitish == 'master' && vars.DOCKERHUB_USERNAME != '' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Checkout the repository | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.release.tag_name }} | |
- name: Set release version number | |
run: sed -i -e "s/latest/${{ github.event.release.tag_name }}/g" docker-compose.dev.yml | |
- name: Build Image | |
run: docker compose -f docker-compose.dev.yml build | |
- name: Push Image to Docker Hub | |
run: docker compose -f docker-compose.dev.yml push | |
docker-build-push: | |
name: Push Development Image | |
if: github.event.release.target_commitish == 'master' && vars.DOCKERHUB_USERNAME != '' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Checkout the repository | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.release.tag_name }} | |
- name: Build Image | |
run: docker compose -f docker-compose.dev.yml build | |
- name: Push Image to Docker Hub | |
run: docker compose -f docker-compose.dev.yml push |