This repository was archived by the owner on Sep 17, 2024. It is now read-only.
forked from flatpak/flatpak.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dc85673
commit cc7f9be
Showing
5 changed files
with
115 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,21 +11,29 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup ruby | ||
uses: ruby/setup-ruby@v1 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
- name: Install ruby dependencies | ||
run: bundle install | ||
- name: Bulid with middleman | ||
run: bundle exec middleman build | ||
- run: bundle install | ||
- run: bundle exec middleman build | ||
|
||
- name: Deploy | ||
run: | | ||
mkdir -p ~/.ssh | ||
ssh-keyscan webapps.flathub.org >> ~/.ssh/known_hosts | ||
eval "$(ssh-agent -s)" | ||
ssh-add - <<< "${DEPLOY_KEY}" | ||
rsync -rP --delete build/ [email protected]: | ||
env: | ||
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }} | ||
- uses: docker/setup-buildx-action@v2 | ||
- uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: docker/build-push-action@v3 | ||
with: | ||
file: Dockerfile | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: | | ||
ghcr.io/flatpak/flatpak.github.io:${{ github.sha }} | ||
ghcr.io/flatpak/flatpak.github.io:latest | ||
labels: | | ||
org.opencontainers.image.revision=${{ github.sha }} | ||
org.opencontainers.image.source=ssh://[email protected]:${{ github.repository }}.git | ||
org.opencontainers.image.url=https://github.com/${{ github.repository }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
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 +1 @@ | ||
2.6.5 | ||
3.0.4 |
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,11 @@ | ||
ARG RUBY_VERSION | ||
FROM docker.io/library/ruby:$RUBY_VERSION AS build | ||
|
||
WORKDIR /builddir | ||
COPY . . | ||
RUN bundle install --deployment | ||
RUN bundle exec middleman build | ||
|
||
FROM docker.io/nginxinc/nginx-unprivileged:stable | ||
COPY --from=build /builddir/build /srv/http/ | ||
ADD nginx.conf /etc/nginx/conf.d/default.conf |
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 |
---|---|---|
@@ -0,0 +1,79 @@ | ||
charset_types | ||
text/css | ||
text/plain | ||
text/vnd.wap.wml | ||
application/javascript | ||
application/json | ||
application/rss+xml | ||
application/xml; | ||
|
||
tcp_nopush on; | ||
gzip on; | ||
gzip_comp_level 5; | ||
gzip_proxied any; | ||
gzip_vary on; | ||
|
||
gzip_types | ||
application/atom+xml | ||
application/javascript | ||
application/json | ||
application/ld+json | ||
application/manifest+json | ||
application/rss+xml | ||
application/vnd.geo+json | ||
application/vnd.ms-fontobject | ||
application/x-font-ttf | ||
application/x-web-app-manifest+json | ||
application/xhtml+xml | ||
application/xml | ||
font/opentype | ||
image/bmp | ||
image/svg+xml | ||
image/x-icon | ||
text/cache-manifest | ||
text/css | ||
text/plain | ||
text/vcard | ||
text/vnd.rim.location.xloc | ||
text/vtt | ||
text/x-component | ||
text/x-cross-domain-policy; | ||
|
||
server { | ||
listen 8080 default_server; | ||
server_name _; | ||
|
||
root /srv/http/; | ||
try_files $uri $uri/ $uri.html =404; | ||
error_page 404 /404.html; | ||
|
||
rewrite ^/setup/(.*)/ https://flatpak.org/setup/$1; | ||
|
||
location /apps.html { | ||
return 301 https://flathub.org/; | ||
} | ||
|
||
location /developer.html { | ||
return 301 http://docs.flatpak.org/en/latest/; | ||
} | ||
|
||
location /getting.html { | ||
return 301 /setup/; | ||
} | ||
|
||
location /hello-world.html { | ||
return 301 http://docs.flatpak.org/en/latest/getting-started.html; | ||
} | ||
|
||
location /runtimes.html { | ||
return 301 http://docs.flatpak.org/en/latest/available-runtimes.html; | ||
} | ||
|
||
# Some flatpak images are compressed SVG files. Skip compressing | ||
# them again but tell clients that they're already compressed since | ||
# many browsers don't know that svgz is compressed. | ||
location ~* \.svgz$ { | ||
gzip off; | ||
add_header Content-Encoding "gzip"; | ||
} | ||
} |