From 61a8ca1f4a0184b835b9dd670fb594cd4090c8a1 Mon Sep 17 00:00:00 2001 From: thinkAfCod Date: Mon, 9 Dec 2024 22:06:29 +0800 Subject: [PATCH] add page.yml --- .github/workflows/page.yml | 51 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/page.yml diff --git a/.github/workflows/page.yml b/.github/workflows/page.yml new file mode 100644 index 0000000000..d22179f1b1 --- /dev/null +++ b/.github/workflows/page.yml @@ -0,0 +1,51 @@ +name: Build and publish forkdiff github-pages +permissions: + contents: write +on: + push: + branches: + - portal + - gethintegration +jobs: + deploy: + concurrency: ci-${{ github.ref }} + runs-on: ubuntu-latest + steps: + - name: Checkout shisui origin + uses: actions/checkout@v3 + with: + path: ./ + ref: portal + fetch-depth: 1 + - name: Checkout shisui + uses: actions/checkout@v3 + with: + path: ./shisui + ref: gethintegration + fetch-depth: 1 + - name: Checkout go-ethereum + uses: actions/checkout@v3 + with: + repository: ethereum/go-ethereum + path: ./go-ethereum + ref: master + fetch-depth: 1 + - name: Build forkdiff + uses: "docker://protolambda/forkdiff:latest" + with: + args: -repo=./shisui -fork=./fork.yaml -out=./index.html -upstream-repo=./go-ethereum + + - name: Build pages + run: | + mkdir -p ./tmp/pages + mv index.html ./tmp/pages/index.html + touch ./tmp/pages/.nojekyll + if [ "$GITHUB_REPOSITORY" == "optimism-java/shisui" ]; then + echo "shisui.github.io" > tmp/pages/CNAME + fi; + + - name: Deploy + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: ./tmp/pages + clean: true