Skip to content

Commit

Permalink
Merge branch 'main' into static
Browse files Browse the repository at this point in the history
  • Loading branch information
denseflux committed Dec 20, 2023
2 parents cdcfa71 + 7d4a189 commit b8ab78e
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 9 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["static"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: static
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
# Upload entire repository
path: 'build/static'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ config/packages
.viminfo
config/composer.lock
build
!build/static
docker-compose-variables.env
container_database
vendor
scripts
db
1 change: 1 addition & 0 deletions docker-compose-variables.env.template
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ MYSQL_PREFIX=omeka_
MYSQL_HOST=db
ENV=test
COMPOSER_AUTH={"gitlab-token":{"actechlab.warwick.ac.uk":"TOKEN"}}
COMPOSER_NO_DEV=0
7 changes: 6 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,9 @@ services:
"-c",
"chmod -R 777 /var/www/html/&& cd /var/www && scripts/build-and-deploy.sh -b test && apache2-foreground"
]

static:
image: httpd
volumes:
- ./build/static:/usr/local/apache2/htdocs:rw
ports:
- "3000:80"
18 changes: 10 additions & 8 deletions scripts.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,18 @@ Help()
echo
}

while getopts 'hb' flag; do
getVersion(){
url="https://github.com/digihum/omeka-project-scripts/archive/refs/tags/v${VERSION}.zip"
message="Downloaded specific scripts version v${VERSION}"
}

url="https://github.com/digihum/omeka-project-scripts/releases/latest/download/latest.zip"
message="Downloaded latest scripts version"

while getopts 'hvb' flag; do
case "${flag}" in
h) Help ;;
v) GetVersion ;;
v) getVersion ;;
*) error "Unexpected option ${flag}" ;;
esac
done
Expand All @@ -61,12 +69,6 @@ done

CheckRequirements

url="https://github.com/digihum/omeka-project-scripts/archive/refs/tags/v0.1.zip"
message="Downloaded latest scripts version"
getVersion(){
url="https://github.com/digihum/omeka-project-scripts/archive/refs/tags/v${VERSION}.zip"
message="Downloaded specific scripts version v${VERSION}"
}

rm -r scripts
wget $url -O scripts.zip
Expand Down

0 comments on commit b8ab78e

Please sign in to comment.