-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/pnp/pnp.github.io
- Loading branch information
Showing
23 changed files
with
22,716 additions
and
66 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
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
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 |
---|---|---|
@@ -1,48 +1,48 @@ | ||
name: Update Calendar Files | ||
name: Update ICAL Files | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main # Trigger on push to main, or adjust as needed | ||
schedule: | ||
- cron: '0 */4 * * *' # Adjust the schedule as necessary | ||
workflow_run: | ||
workflows: ["Deploy Hugo Site"] | ||
types: | ||
- completed | ||
|
||
- cron: '0 12 * * *' # Optionally, schedule to run daily | ||
|
||
jobs: | ||
update-and-push: | ||
update-ical: | ||
name: Get ICS and Process | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Checkout gh-pages branch | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: gh-pages # Specify to checkout the gh-pages branch | ||
path: gh-pages | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
working-directory: .github/scripts | ||
|
||
- name: Run script to update calendar files | ||
run: npm start --action | ||
working-directory: .github/scripts | ||
env: | ||
ICS_URL: ${{ secrets.ICS_URL }} | ||
|
||
- name: Commit and push if there are changes | ||
run: | | ||
cd gh-pages | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GitHub Action" | ||
git add calendar.ics ical/calendar.json | ||
git commit -m "Update calendar files" -a || echo "No changes to commit" | ||
git push origin gh-pages | ||
|
||
- name: Checkout main branch | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: main # Specify the branch to checkout | ||
path: main | ||
|
||
- name: Checkout gh-pages branch | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: gh-pages # Specify the branch to checkout | ||
path: gh-pages | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '14' # Specify your Node.js version | ||
|
||
- name: Install dependencies | ||
run: npm install # Assuming your script needs npm packages | ||
working-directory: ./main/.github/scripts | ||
|
||
- name: Update ICAL File | ||
run: node index.js --action # Run your specific script | ||
working-directory: ./main/.github/scripts | ||
|
||
- name: Commit and push if there are changes | ||
run: | | ||
cd gh-pages | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GitHub Action" | ||
git add calendar.ics ical/calendar.json | ||
git commit -m "Update calendar files" -a || echo "No changes to commit" | ||
git push origin gh-pages |
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,7 @@ | ||
--- | ||
title: PnP PowerShell extension | ||
description: > | ||
Boost your productivity when creating scripts that use PnP PowerShell. Embedded docs, samples gallery, code snippets, and more. | ||
image: images/extensions-background-pnp-ps.webp | ||
externalLink: "https://marketplace.visualstudio.com/items?itemName=adamwojcikit.pnp-powershell-extension" | ||
--- |
Binary file not shown.
Oops, something went wrong.