Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workaround until will be merged: https://github.com/actions/runner/pull/1684 #16

Open
github-actions bot opened this issue Jan 30, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@github-actions
Copy link
Contributor

# FIXME: workaround until will be merged: https://github.com/actions/runner/pull/1684

name: "Deploy - Github Pages"
description: "Action to deploy a static site to Github Pages."
author: Hoverkraft
branding:
  icon: send
  color: gray-dark

inputs:
  build-artifact-name:
    description: 'The name of the "build" artifact to download.'
    required: false
    default: "build"
  build-assets-path:
    description: "The path to the build assets to deploy."
    required: false
    default: "."
  budget-path:
    description: "The path to the performance budget file. See <../lighthouse/README.md>."
    required: false
    default: "./budget.json"

outputs:
  url:
    description: "The URL of the deployed site."
    value: ${{ steps.deployment.outputs.page_url }}

runs:
  using: "composite"
  steps:
    - shell: bash
      # FIXME: workaround until will be merged: https://github.com/actions/runner/pull/1684
      run: mkdir -p ./self-github-pages-action/ && cp -r $GITHUB_ACTION_PATH/../* ./self-github-pages-action/

    - uses: actions/download-artifact@v4
      with:
        name: ${{ inputs.artifact-name }}
        path: /

    - shell: bash
      run: |
        if [ ! -d ${{ inputs.build-assets-path }} ]; then
          echo "::error::Build assets path does not exist: ${{ inputs.build-assets-path }}"
          exit 1
        fi

    - uses: ./self-github-pages-action/jampack
      with:
        path: ${{ inputs.build-assets-path }}

    - name: 📦 Upload website build artifact
      uses: actions/upload-pages-artifact@v3
      with:
        path: ${{ inputs.build-assets-path }}

    - name: ⚙️ Setup Pages
      uses: actions/configure-pages@v5

    - name: 🚀 Deploy to GitHub Pages
      id: deployment
      uses: actions/deploy-pages@v4

    - name: 🔭 Check the site is up
      uses: srt32/[email protected]
      with:
        url-to-hit: ${{ steps.deployment.outputs.page_url }}
        expected-statuses: "200"

    - uses: ./self-github-pages-action/lighthouse
      with:
        urls: ${{ steps.deployment.outputs.page_url }}
        budget-path: ${{ inputs.budget-path }}
@github-actions github-actions bot added the bug Something isn't working label Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

0 participants