Skip to content

Value 'github-pages' is not valid #369

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

Closed
bennycode opened this issue Aug 5, 2024 · 2 comments
Closed

Value 'github-pages' is not valid #369

bennycode opened this issue Aug 5, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@bennycode
Copy link

Describe the bug

The GitHub Actions extension for VS Code shows me that "github-pages" is not a supported environment.

To Reproduce

Steps to reproduce the behavior:

  1. With this workflow: https://github.com/actions/deploy-pages?tab=readme-ov-file#usage
  2. Do this: Open your ".github/workflows/deploy.yml" file
  3. See error (the extensions shows: Value 'github-pages' is not valid)

Expected behavior

Accept "github-pages" as value.

Screenshots

image

Extension Version
v0.26.3

Additional context

Here is my full workflow:

name: "Deploy Website"

on:
  push:
    branches: ["master"]

jobs:
  build:
    name: "Build"
    runs-on: ubuntu-latest
    steps:
      - name: "Checkout Code"
        uses: actions/checkout@v4
      - name: "Setup Node"
        uses: actions/setup-node@v4
        with:
          node-version: "20"
      - name: "Build Website"
        run: npm ci && npm run build
      - name: "Upload artifact"
        uses: actions/upload-pages-artifact@v3
        with:
          path: ./dist

  deploy:
    environment:
      name: "github-pages"
      url: ${{ steps.deployment.outputs.page_url }}
    needs: build
    permissions:
      pages: write
      id-token: write
    runs-on: ubuntu-latest
    name: "Deploy"
    steps:
      - name: "Deploy to GitHub Pages"
        id: deployment
        uses: actions/deploy-pages@v4
@muzimuzhi
Copy link
Contributor

It works for me. Does retyping the environment name help?

@bennycode
Copy link
Author

Yes, retyping the name helps indeed!

@github-project-automation github-project-automation bot moved this from Backlog 🗒 to Done 💤 in GitHub Actions VS Code Extension Sep 5, 2024
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
Development

No branches or pull requests

3 participants