Skip to content

Commit c906ba2

Browse files
authored
Issue-8: Update build v3 (#13)
build and deploy should be in same file Received the following error during build: `The workflow is not valid. .github/workflows/deploy.yml (Line: 21, Col: 3): The workflow must contain at least one job with no dependencies. ` The easiest way to resolve this is to move the deployment back to the same workflow file as the build. Relates to Issue #8
2 parents 7201f04 + 6a8f44e commit c906ba2

File tree

2 files changed

+16
-32
lines changed

2 files changed

+16
-32
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
branches: [ master, main ]
66
pull_request:
77
types: [opened, synchronize, reopened]
8+
release:
9+
types: [ published, prereleased, released ]
810
workflow_dispatch:
911

1012
env:
@@ -43,3 +45,17 @@ jobs:
4345
- name: Upload artifact
4446
# Automatically uploads an artifact from the './_site' directory by default
4547
uses: actions/upload-pages-artifact@v3
48+
49+
deploy:
50+
environment:
51+
name: github-pages
52+
url: ${{ steps.deployment.outputs.page_url }}
53+
runs-on: ubuntu-latest
54+
needs: build
55+
steps:
56+
- name: Show Env
57+
run: env
58+
- name: Deploy to GitHub Pages
59+
if: github.ref_name == 'main'
60+
id: deployment
61+
uses: actions/deploy-pages@v4

.github/workflows/deploy.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)