From 04931c2d36fd2b36261304e14d361ea704f1aca7 Mon Sep 17 00:00:00 2001 From: Ankit kumar <78584803+flyingit@users.noreply.github.com> Date: Fri, 11 Nov 2022 12:22:36 +0530 Subject: [PATCH 1/2] Create integration.yml just trial --- .github/workflows/integration.yml | 72 +++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .github/workflows/integration.yml diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml new file mode 100644 index 0000000..018c638 --- /dev/null +++ b/.github/workflows/integration.yml @@ -0,0 +1,72 @@ +name: GitHub Pages + +on: + push: + branches: + - main + +jobs: + release-project: + name: Release static site to github releases + runs-on: ubuntu-latest + needs: deploy + steps: + - name: Download site content + uses: actions/download-artifacts@v2 + with: + name: static-site + - name: Archive site content + uses: thedoctor0/zip-release@main + with: + filename: site.zip + - name: create Github Release + id: create-new-release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: v${{ github.run_number }} + release_name: Release V${{ github.run_number }} + - name: Upload asset to Github Release + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}} + with: + upload_url: ${{ steps.create-new-release.outputs.upload_url }} + asset_path: ./site.zip + asset_name: site-v${{ github.run_number }}.zip + asset_content_type: application/zip + + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: 16 + + - name: Install dependencies + run: npm install + + - name: Run tests + run: npm run test:headless + + - name: Build + run: npm run build:prod + + - name: Upload static website + uses: actions/upload-artifact@v2 + with: + name: static-site + path: out/ + + - name: Deploy + if: success() + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: dist/angular-github-actions + enable_jekyll: true From 0f8f238342b9b5e9c234f81c6c29046d454904d7 Mon Sep 17 00:00:00 2001 From: Ankit kumar <78584803+flyingit@users.noreply.github.com> Date: Fri, 11 Nov 2022 12:27:35 +0530 Subject: [PATCH 2/2] Rename integration.yml to automation.yml --- .github/workflows/{integration.yml => automation.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{integration.yml => automation.yml} (100%) diff --git a/.github/workflows/integration.yml b/.github/workflows/automation.yml similarity index 100% rename from .github/workflows/integration.yml rename to .github/workflows/automation.yml