Merge pull request #128 from kijimaD/dependabot/npm_and_yarn/semantic… #871
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: Publish | |
on: | |
workflow_dispatch: | |
push: | |
jobs: | |
tag: | |
runs-on: ubuntu-latest | |
outputs: | |
git-tag: ${{ steps.git-tag.outputs.git-tag }} | |
steps: | |
- name: Check out | |
uses: actions/checkout@v3 | |
- name: Get git tag(short) | |
id: git-tag | |
run: | | |
GIT_TAG=$(git rev-parse --short HEAD) | |
echo "::set-output name=git-tag::$GIT_TAG" | |
release_image: | |
if: github.ref == 'refs/heads/main' | |
needs: tag | |
uses: ./.github/workflows/build.yml | |
with: | |
image: ghcr.io/kijimad/roam_release:${{ needs.tag.outputs.git-tag }},ghcr.io/kijimad/roam_release:latest | |
target: release | |
secrets: | |
WRITE_PACKAGE: ${{ secrets.WRITE_PACKAGE }} | |
staging_image: | |
needs: tag | |
uses: ./.github/workflows/build.yml | |
with: | |
image: ghcr.io/kijimad/roam_staging:${{ needs.tag.outputs.git-tag }},ghcr.io/kijimad/roam_staging:latest | |
target: staging | |
secrets: | |
WRITE_PACKAGE: ${{ secrets.WRITE_PACKAGE }} | |
build_image: | |
needs: tag | |
uses: ./.github/workflows/build.yml | |
with: | |
image: ghcr.io/kijimad/roam_build:${{ needs.tag.outputs.git-tag }},ghcr.io/kijimad/roam_build:latest | |
target: build | |
secrets: | |
WRITE_PACKAGE: ${{ secrets.WRITE_PACKAGE }} | |
publish: | |
needs: | |
- tag | |
- release_image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out | |
uses: actions/checkout@v3 # publish actions require git | |
- name: copy | |
run: | | |
docker run --detach --name release ghcr.io/kijimad/roam_release:${{ needs.tag.outputs.git-tag }} && \ | |
docker cp release:/roam/public . && \ | |
sudo chown -R $USER:$USER ./public | |
- name: check | |
run: | | |
ls -al ./public | |
- name: Publish generated content to GitHub Pages | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: public |