diff --git a/.github/workflows/CODEOWNERS b/.github/workflows/CODEOWNERS deleted file mode 100644 index 01de8dc..0000000 --- a/.github/workflows/CODEOWNERS +++ /dev/null @@ -1 +0,0 @@ -* @boundless-forest \ No newline at end of file diff --git a/.github/workflows/deploy-dev.yml b/.github/workflows/deploy-dev.yml index bbe8d1a..f4085b4 100644 --- a/.github/workflows/deploy-dev.yml +++ b/.github/workflows/deploy-dev.yml @@ -1,4 +1,4 @@ -name: Deploy develop +name: Deploy PR preview on: pull_request: @@ -6,11 +6,13 @@ on: jobs: deploy: - name: Deploy + name: Deploy pages runs-on: ubuntu-latest steps: - name: Fetch latest code uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Setup Python uses: actions/setup-python@v5 with: diff --git a/.github/workflows/deploy-prd.yml b/.github/workflows/deploy-prd.yml index 8670861..ba2b145 100644 --- a/.github/workflows/deploy-prd.yml +++ b/.github/workflows/deploy-prd.yml @@ -1,42 +1,48 @@ -name: Deploy production - -on: - push: - tags: - - 'v*' - -jobs: - deploy: - name: Deploy pages - runs-on: ubuntu-latest - steps: - - name: Fetch latest code - uses: actions/checkout@v4 - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: "3.12" - - name: Build pages - run: | - pip3 install poetry - poetry run poetry install --no-root - poetry run mkdocs build - - name: Setup Vercel environment - uses: actions/checkout@v4 - with: - repository: darwinia-network/devops - path: .github - - name: Deploy to Vercel - uses: ./.github/actions/smart-vercel - with: - vercel_token: ${{ secrets.VERCEL_TOKEN }} - vercel_group: itering - preview_output: true - project_name: darwinia-docs - dist_path: site - prod_mode: true - script_run: false - enable_cache: true - enable_notify_slack: true - slack_channel: darwinia-document - slack_webhook: ${{ secrets.SLACK_INCOMING_WEBHOOK_URL }} +name: Deploy production with GitHub Pages + +on: + push: + tags: + - "v*" + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Fetch latest code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + - name: Build pages + run: | + pip3 install poetry + poetry run poetry install --no-root + poetry run mkdocs build + - name: Setup Pages + uses: actions/configure-pages@v4 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: "site" + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/deploy-stg.yml b/.github/workflows/deploy-stg.yml index 0202706..70ce77f 100644 --- a/.github/workflows/deploy-stg.yml +++ b/.github/workflows/deploy-stg.yml @@ -1,4 +1,4 @@ -name: Deploy staging +name: Deploy staging preview on: push: @@ -11,6 +11,8 @@ jobs: steps: - name: Fetch latest code uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Setup Python uses: actions/setup-python@v5 with: diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ff6d490 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +# System +.DS_Store + +# Integrated Development Environment +.idea +.vscode + +# Cache +site