Reduce quickstart button spacing #1257
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
name: github pages | |
on: | |
push: | |
branches: ["main"] | |
repository_dispatch: | |
workflow_dispatch: | |
# schedule: ## Run at 12.am daily to check for broken links automatically | |
# - cron: '0 0 * * *' | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
HUGO_VERSION: 0.123.6 | |
steps: | |
- name: Install Hugo CLI | |
run: | | |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ | |
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup Pages | |
id: pages | |
uses: actions/configure-pages@v2 | |
- name: Set baseURL | |
run: sed -i "s|https://www.neurodesk.org/|${{ steps.pages.outputs.base_url }}/|g" config.toml | |
- name: Install dependencies | |
run: | | |
npm install | |
- name: Build with Hugo | |
env: | |
HUGO_ENVIRONMENT: production | |
HUGO_ENV: production | |
run: | | |
echo "BASEURL=${{ steps.pages.outputs.base_url }}" | |
hugo \ | |
--minify \ | |
--baseURL "${{ steps.pages.outputs.base_url }}/" | |
- name: Add custom domain | |
if: github.repository == 'NeuroDesk/neurodesk.github.io' | |
run: cp ./static/CNAME ./public/CNAME | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: ./public | |
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@v1 | |
# - name: Algolia crawler creation and crawl | |
# uses: algolia/[email protected] | |
# id: algolia_crawler | |
# with: # mandatory parameters | |
# crawler-user-id: ${{ secrets.CRAWLER_USER_ID }} | |
# crawler-api-key: ${{ secrets.CRAWLER_API_KEY }} | |
# algolia-app-id: ${{ secrets.ALGOLIA_APP_ID }} | |
# algolia-api-key: ${{ secrets.ALGOLIA_API_KEY }} | |
# site-url: 'https://www.neurodesk.org' | |
check-links: | |
runs-on: ubuntu-latest | |
needs: deploy | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Pages | |
id: pages | |
uses: actions/configure-pages@v2 | |
- name: Create config file | |
run: | | |
echo ${{ steps.pages.outputs.base_url }} | |
echo '{ | |
"replacementPatterns": [ | |
{ | |
"pattern": "^/", | |
"replacement": "${{ steps.pages.outputs.base_url }}/" | |
} | |
], | |
"ignorePatterns": [ | |
{ | |
"pattern": "^https://twitter.com" | |
}, | |
{ | |
"pattern": "^http://localhost" | |
} | |
], | |
"aliveStatusCodes": [429, 403, 200] | |
}' > .github/workflows/config.json | |
cat .github/workflows/config.json | |
- uses: gaurav-nelson/github-action-markdown-link-check@v1 | |
# checks all markdown files from content/en including all subfolders | |
with: | |
use-quiet-mode: 'yes' | |
use-verbose-mode: 'no' | |
config-file: '.github/workflows/config.json' | |
folder-path: 'content/en/' |