Skip to content

Commit 782a178

Browse files
committed
include enable workflow context
1 parent 506b939 commit 782a178

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed
372 KB
Loading

src/lab_0/readme.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,31 @@ To [set up your github pages site](https://docs.github.com/en/pages/getting-star
112112

113113
<img src='assets/pages.png'>
114114

115-
The workflow code is already included in the main class repository. When you push your changes up to github, then your site will automatically be redeployed and be avallable at `https://[YOUR_USERNAME].github.io/[YOUR_REPOSITORY_NAME]/`.
115+
The workflow code is already included in the main class repository, but disabled by default. The workflow file is something called a `.yml` file, located in the `.github` file at `.github/workflows/deploy.yml`. This workflow includes instructions telling github to build and deploy your app whenever you push to main. You shouldn't have to change this file at all, but here's the key commands of the file for your understanding:
116+
117+
```yml
118+
on:
119+
# Run this workflow whenever a new commit is pushed to main.
120+
push: {branches: [main]}
121+
122+
jobs:
123+
# define the job
124+
deploy:
125+
...
126+
steps:
127+
- run: npm run build # builds the app
128+
...
129+
- name: Deploy # run the github deploy pages action
130+
id: deployment
131+
uses: actions/deploy-pages@v4
132+
133+
```
134+
135+
To deploy your app on push, you need to enable these workflows. Navigate to the "actions" tab, and click "I understand my workflows, go ahead and enable them". The app will now deploy on push.
136+
137+
<img src='assets/enable_workflow.png'>
138+
139+
When you push your changes up to github, then your site will automatically be redeployed and be avallable at `https://[YOUR_USERNAME].github.io/[YOUR_REPOSITORY_NAME]/`.
116140

117141
Once you have pushed a change, you can see all the deployments triggered from pushed in the deployments section of your repository page. These will not be triggered until you make a change to your repo and push it back up to github.
118142

0 commit comments

Comments
 (0)