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

use gh #76

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/workflows/Build pkgdown site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Build pkgdown site

on:
workflow_dispatch: # Trigger manually
workflow_run:
workflows: ["Trigger Build pkgdown Site"]
types:
- completed

concurrency:
group: ${{ github.ref }}-${{ github.workflow }} # Use the branch reference as the concurrency group
Expand Down Expand Up @@ -75,9 +79,10 @@ jobs:
git add -A
if ! git diff --cached --quiet; then
git commit -m 'Build pkgdown site [skip ci]'
git pull --rebase origin ${{ github.head_ref }}
git push origin HEAD:${{ github.head_ref }}
# Extract the branch name from the full reference
BRANCH_NAME=${GITHUB_REF##*/}
git pull --rebase origin "$BRANCH_NAME"
git push origin HEAD:"$BRANCH_NAME"
else
echo "No changes to commit."
fi

28 changes: 17 additions & 11 deletions .github/workflows/trigger_build_pkgdown_site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,21 @@ jobs:
trigger-build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install GitHub CLI
run: |
sudo apt update
sudo apt install -y gh

- name: Configure GitHub CLI
run: echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token

- name: Trigger Build pkgdown site
uses: actions/github-script@v6
with:
script: |
const workflow_id = "Build pkgdown site"; // The name of the workflow to trigger
const response = await github.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id,
ref: context.ref, // The branch or tag to run the workflow on
});
console.log(`Triggered workflow: ${response.data.message}`);
run: |
# Extract the branch name from the full reference
BRANCH_NAME=${GITHUB_REF##*/}
gh workflow run "Build pkgdown site" --ref "$BRANCH_NAME"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: fistools
Title: Tools & data used for wildlife management & invasive species in Flanders
Version: 1.2.4
Version: 1.2.5
Authors@R: c(
person(given = "Sander", middle = "", family = "Devisscher", "[email protected]",
role = c("aut", "cre"), comment = c(ORCID = "0000-0003-2015-5731")),
Expand Down
2 changes: 1 addition & 1 deletion docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/CODE_OF_CONDUCT.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/LICENSE-text.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/LICENSE.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions docs/authors.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ pandoc: 2.9.2.1
pkgdown: 2.1.0
pkgdown_sha: ~
articles: {}
last_built: 2024-08-23T09:45Z
last_built: 2024-08-23T17:11Z
2 changes: 1 addition & 1 deletion docs/reference/CRS_extracter.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/UUID_List.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/apply_grtsdb.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/boswachterijen.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/calculate_polygon_centroid.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/check.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/cleanup_sqlite.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/col_content_compare.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/colcompare.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/collect_osm_features.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/download_dep_media.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/download_gdrive_if_missing.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/download_seq_media.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/drg_example.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/install_sp.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/label_converter.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/label_selecter.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/lib_crs.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.