This repository has been archived by the owner on Nov 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add a GitHub Action to test basic functionality
- Loading branch information
1 parent
f9db830
commit ff9d348
Showing
1 changed file
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Basic Test | ||
|
||
# Run this test anytime someone pushes to a branch. | ||
on: [push] | ||
|
||
# Checkout | ||
# https://docs.github.com/en/actions/quickstart#creating-your-first-workflow | ||
# to learn more about syntax for GitHub Actions. | ||
# "jobs" appears to be a GitHub Action keyword. | ||
jobs: | ||
# We pick the name "tests". | ||
tests: | ||
# On what software do you want this test to run? | ||
runs-on: ubuntu-latest | ||
# I copied and pasted the first three "run" steps from | ||
# https://docs.github.com/en/actions/quickstart#creating-your-first-workflow | ||
steps: | ||
- run: echo "π The job was automatically triggered by a ${{ github.event_name }} event." | ||
- run: echo "π§ This job is now running on a ${{ runner.os }} server hosted by GitHub!" | ||
- run: echo "π The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | ||
- name: Check out this repository's code. | ||
uses: actions/checkout@v2 | ||
# I copied and pasted the next several "run" steps from | ||
# https://docs.github.com/en/actions/quickstart#creating-your-first-workflow | ||
- run: echo "π‘ The ${{ github.repository }} repository has been cloned to the runner." | ||
- run: echo "π₯οΈ The workflow is now ready to test your code on the runner." | ||
- name: List files in this repository. | ||
run: | | ||
ls ${{ github.workspace }} | ||
# These are commands specific to this repository. | ||
# https://github.com/reach-sh/reach-developer-portal#deploy-the-site-locally | ||
- name: Change to the `tools` directory. | ||
run: cd tools | ||
- name: Install dependencies using Node Package Manger, or `npm`. | ||
run: npm install | ||
- name: Build custom plugins. | ||
run: npm run s1 && npm run s2 && npm run s3 && npm run s4 | ||
- name: Run the `generator.js` file. | ||
run: node generator.js -t all | ||
- name: Change back to the parent directory. | ||
run: cd .. | ||
- name: Install `http-server`. | ||
run: npm i --global http-server | ||
- name: Turn off server caching. | ||
run: http-server -c-1 | ||
|
||
# Create a webpage! | ||
- name: Create a folder, e.g., a folder called `colors-and-shapes`. | ||
run: mkdir -p en/pages/colors-and-shapes | ||
- name: Create an `index.md` file inside the newly created folder. | ||
run: touch en/pages/colors-and-shapes/index.md | ||
- name: Generate the webpage! | ||
run: node tools/generator.js -t folder -d en/pages/colors-and-shapes | ||
|
||
# Print out the status of this job. | ||
- run: echo "π This job's status is ${{ job.status }}." |