Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev percyfal #97

Merged
merged 11 commits into from
Nov 14, 2023
Merged
46 changes: 45 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- 'main'
- 'test-build'
tags:
- "*"
- "v*"

env:
PARTICIPANT_DATA:
Expand Down Expand Up @@ -98,3 +98,47 @@ jobs:
path: docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Render tag and save rendered state in separate branch
uses: quarto-dev/quarto-actions/publish@v2
if: startsWith(github.ref, 'refs/tags/v')
with:
target: ${{ github.ref_name }}
path: docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# - name: Checkout archived course versions
# env:
# GITHUB_EMAIL: [email protected]
# GITHUB_USERNAME: gh_action
# TARGET: gh_pages
# run: |
# # Add git info
# git config --global user.email "${{ env.GITHUB_EMAIL }}"
# git config --global user.name "${{ env.GITHUB_USERNAME }}"
# git clone --single-branch --branch ${{ env.TARGET }} "https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git" tmprepo
# cd tmprepo
# mkdir -p archive
# cd archive
# git branch -l
# ls -lh

# # Add archive index page
# cat .header.html > index.html

# # Loop tags that match v\d+
# for tag in $(git tag --list v[0-9][0-9][0-9][0-9]); do
# if [ -d $tag ]; then
# echo "Directory ${tag} already exsists. Removing"
# git clone --depth 1 --branch $tag "https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git" $tag
# contents=$(git tag -n 100 $tag --format "%(contents)")
# echo "<section id=\"$tag\" class=\"level3\">" >> index.html
# echo "<h3 class=\"anchored\" data-anchor-id=\"$tag\">" >> index.html
# echo "<a href=\"$link\">$tag</a>" >> index.html
# echo "</h3>" >> index.html
# echo "<p>$contents</p>" >> index.html
# echo "</section>" >> index.html
# done

# cat .footer.html >> index.html
4 changes: 3 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ repos:
(?x)^(
docs/slides/population_structure/data/DavidReich/AADR\.ind|
docs/slides/population_structure/data/DavidReich/AADR\.snp|
docs/slides/population_structure/data/DavidReich/AADR\.geno
docs/slides/population_structure/data/DavidReich/AADR\.geno|
docs/archive/.footer.html|
docs/archive/.header.html|
)
- repo: https://github.com/lorenzwalthert/precommit
rev: v0.3.2.9023
Expand Down
6 changes: 6 additions & 0 deletions docs/_course_info.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
current: NBIS_POPGENIP_H23
NBIS_POPGENIP_TBA:
start_time: null
end_time: null
application_opens: null
application_closes: null
canvas_home_page: null
NBIS_POPGENIP_H23:
start_time: 2023/11/06
end_time: 2023/11/10
Expand Down
2 changes: 1 addition & 1 deletion docs/_quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ project:
- "contents.qmd"
- "info.qmd"
- "precourse.qmd"
- "references.qmd"
#- "references.qmd"
- "schedule.qmd"
- "syllabus.qmd"
# Exercises
Expand Down
Loading
Loading