From 07b6079eedcebfbc18051cbce6d59e4863f1b488 Mon Sep 17 00:00:00 2001 From: Dmitri Smirnov Date: Tue, 9 Jul 2024 21:07:45 -0400 Subject: [PATCH] fix: add deploy --- .github/workflows/release.yml | 35 +++++++++++++++++++++++++++++++++++ esi-shell | 1 + 2 files changed, 36 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eb9e6d5..4b3d45d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,6 +25,41 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + deploy: + # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages + permissions: + contents: read + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build-test-release + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} + + - run: | + SEMVER=$(grep -Po '"version": "\K[^"]*' package.json) + sed -i "s/ESI_SHELL_VERSION=.*/ESI_SHELL_VERSION=${SEMVER}-$(git rev-parse --short HEAD)/g" esi-shell + + - run: grep ESI_SHELL_VERSION esi-shell + + - name: Setup Pages + uses: actions/configure-pages@v5 + + - name: Build with Jekyll + uses: actions/jekyll-build-pages@v1 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 cleanup: runs-on: ubuntu-latest diff --git a/esi-shell b/esi-shell index 95def11..2afc531 100755 --- a/esi-shell +++ b/esi-shell @@ -29,6 +29,7 @@ REQUIRED_DOCKER_VERSION=23.0.0 IMAGE_NAME="ghcr.io/bnlnpps/esi-shell" DEFAULT_VERSION="latest" VERSION=$DEFAULT_VERSION +ESI_SHELL_VERSION= CONTAINER_COMMAND= CONTAINER_OPTIONS=