From 48b700002564ce43fc867d3389beebcc89204860 Mon Sep 17 00:00:00 2001 From: Olivia Guyot Date: Tue, 2 Jul 2024 23:57:24 +0200 Subject: [PATCH] ci: deploy md-converter app on gh-pages --- .github/workflows/deploy.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7320553d00..cd999d6c68 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -105,3 +105,33 @@ jobs: comment_tag: github-links pr_number: ${{ github.event.issue.number }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + apps: + needs: checks + if: github.event_name != 'issue_comment' + name: Deploy Apps to GitHub Pages + runs-on: ubuntu-latest + env: + BRANCH_NAME: main + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Use Node.js ${{ env.NODE_VERSION }} + uses: actions/setup-node@v3 + with: + node-version: ${{ env.NODE_VERSION }} + cache: 'npm' + + - name: Install + run: npm ci + + - name: Build metadata-converter + run: npx nx build metadata-converter --prod + + - name: Deploy to directory ${{ env.BRANCH_NAME }} + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + npx gh-pages --dist dist/apps/ --dest ${{env.BRANCH_NAME}} --remove "${{env.BRANCH_NAME}}/**" --no-history --repo "https://${GITHUB_ACTOR}:${{secrets.GITHUB_TOKEN}}@github.com/${GITHUB_REPOSITORY}.git"