Skip to content

Commit 9bee02d

Browse files
authored
Merge pull request #23 from dasc-lab/passwd_test
Added passwords to tutorials for flylab
2 parents bdf186e + a7c72a2 commit 9bee02d

File tree

2 files changed

+67
-0
lines changed

2 files changed

+67
-0
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Deploy Jekyll with GitHub Pages/Encryption
2+
3+
on:
4+
# Runs on pushes targeting the default branch
5+
push:
6+
branches: ["master", "passwd_test"]
7+
8+
# Allows you to run this workflow manually from the Actions tab
9+
workflow_dispatch:
10+
11+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
18+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
19+
concurrency:
20+
group: "pages"
21+
cancel-in-progress: false
22+
23+
jobs:
24+
# Build job
25+
build:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v3
30+
- name: Setup Pages
31+
uses: actions/configure-pages@v3
32+
- name: Build with Jekyll
33+
uses: actions/jekyll-build-pages@v1
34+
with:
35+
source: ./
36+
destination: ./_site
37+
38+
# Begin encryption code.
39+
# This portion of the build job was written by Evan Baldonado (EvanBaldonado.com). Please do not remove this comment.
40+
# Note: this only encrypts .html pages and not any of the corresponding assets.
41+
- name: Encrypt pages with PageCrypt
42+
run: |
43+
npm i -D pagecrypt
44+
cat docs/_protected_pages.txt | while read file password;
45+
do
46+
sudo npx pagecrypt "_site/$file" "_site/$file" "$password"
47+
done
48+
# End encryption code.
49+
50+
- name: Upload artifact
51+
uses: actions/upload-pages-artifact@v3
52+
53+
# Deployment job
54+
deploy:
55+
environment:
56+
name: github-pages
57+
url: ${{ steps.deployment.outputs.page_url }}
58+
runs-on: ubuntu-latest
59+
needs: build
60+
steps:
61+
- name: Deploy to GitHub Pages
62+
id: deployment
63+
uses: actions/deploy-pages@v4

docs/_protected_pages.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
docs/flylab/flylab.html flylab
2+
docs/flylab/calibration.html flylab
3+
docs/flylab/faqs.html flylab
4+
docs/flylab/object.html flylab

0 commit comments

Comments
 (0)