From 7d6a23509fc512b31488395a06daf86d664183e5 Mon Sep 17 00:00:00 2001 From: Jan Baudisch Date: Thu, 22 Aug 2024 10:47:32 +0200 Subject: [PATCH] feat: initial commit --- .github/workflows/One.yaml | 23 +++++++++++++++++++++++ .github/workflows/Pages.yaml | 24 ++++++++++++++++++++++++ .github/workflows/Two.yaml | 23 +++++++++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 .github/workflows/One.yaml create mode 100644 .github/workflows/Pages.yaml create mode 100644 .github/workflows/Two.yaml diff --git a/.github/workflows/One.yaml b/.github/workflows/One.yaml new file mode 100644 index 0000000..764b9f8 --- /dev/null +++ b/.github/workflows/One.yaml @@ -0,0 +1,23 @@ +name: One + +on: + - push + +jobs: + Build: + runs-on: ubuntu-latest + steps: + - name: Build + run: | + mkdir -p pages/one + echo "Hello world one!" > pages/one/index.html + - name: Upload + uses: actions/upload-artifact@v4 + with: + name: pages-one + path: pages + + Pages: + if: github.ref == 'refs/heads/main' + needs: Build + uses: ./.github/workflows/Pages.yaml diff --git a/.github/workflows/Pages.yaml b/.github/workflows/Pages.yaml new file mode 100644 index 0000000..6975429 --- /dev/null +++ b/.github/workflows/Pages.yaml @@ -0,0 +1,24 @@ +name: Pages + +on: workflow_call + +jobs: + Deploy: + permissions: + pages: write + id-token: write + runs-on: ubuntu-latest + steps: + - name: Download + uses: actions/download-artifact@v4 + with: + path: pages + pattern: pages-* + merge-multiple: true + github-token: ${{ secrets.GITHUB_TOKEN }} + - name: Upload + uses: actions/upload-pages-artifact@v3 + with: + path: pages + - name: Deploy + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/Two.yaml b/.github/workflows/Two.yaml new file mode 100644 index 0000000..6787346 --- /dev/null +++ b/.github/workflows/Two.yaml @@ -0,0 +1,23 @@ +name: Two + +on: + - push + +jobs: + Build: + runs-on: ubuntu-latest + steps: + - name: Build + run: | + mkdir -p pages/two + echo "Hello world two!" > pages/two/index.html + - name: Upload + uses: actions/upload-artifact@v4 + with: + name: pages-two + path: pages + + Pages: + if: github.ref == 'refs/heads/main' + needs: Build + uses: ./.github/workflows/Pages.yaml