diff --git a/.eslintignore b/.eslintignore index 51d3a61..e8bfcc6 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,2 +1,4 @@ coverage -/dist/ \ No newline at end of file +/dist/ +docs/tools/ +/theme/ diff --git a/.github/workflows/mdbook.yml b/.github/workflows/mdbook.yml new file mode 100644 index 0000000..a168d40 --- /dev/null +++ b/.github/workflows/mdbook.yml @@ -0,0 +1,55 @@ +name: Deploy mdBook site to Pages + +on: + push: + branches: ["main"] + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Build job + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Install latest mdbook + run: | + tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name') + mdbook_url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz" + admonish_url="https://github.com/tommilligan/mdbook-admonish/releases/download/v1.14.0/mdbook-admonish-v1.14.0-x86_64-unknown-linux-gnu.tar.gz" + mkdir mdbook + curl -sSL $mdbook_url | tar -xz --directory=./mdbook + curl -sSL $admonish_url | tar -xz --directory=./mdbook + echo `pwd`/mdbook >> $GITHUB_PATH + - name: Build Book + run: | + mdbook build + - name: Setup Pages + uses: actions/configure-pages@v3 + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + # Upload entire repository + path: "book" + + # Deployment job + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 diff --git a/.gitignore b/.gitignore index c9eb75b..28f9e92 100644 --- a/.gitignore +++ b/.gitignore @@ -132,4 +132,7 @@ dist .pnp.* # build folder -/dist \ No newline at end of file +/dist + +# mdbook (docs) +book diff --git a/README.md b/README.md index 196b309..f6dc9b4 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,9 @@ -setup: -```js -import * as helpers from '@freeCodeCamp/curriculum-helpers' +# Curriculum Helpers -new helpers.CSSHelp(document).getCSSRules(); - -helpers.removeHtmlComments('