Skip to content

Commit

Permalink
Publish to cloudfront with github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
gornostal committed Nov 13, 2022
1 parent 0010215 commit 66cbf80
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 3 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish to Cloudfront

on:
push:
branches: [ master ]

jobs:
publish:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0' # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Install dependencies
run: gem install json github-pages jekyll-github-metadata minitest
- name: Build
run: jekyll build

- uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install AWS CLI
run: |
python -m pip install --upgrade pip
pip install awscli
- run: aws s3 sync _site s3://ulauncher.io --region us-east-1 --cache-control max-age=0 --acl public-read
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Invalidate Cloudfront
run: aws cloudfront create-invalidation --distribution-id EUJKQR38BVSMX --paths "/*"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
name: ulauncher.io
description: Ulauncher App
exclude: ['README.md', 'run-locally.sh', 'build.sh', 'LICENSE.txt', 'travis.yml']
exclude: ['README.md', 'Dockerfile', 'jekyll', 'run-locally.sh', 'build.sh', 'LICENSE.txt', 'travis.yml']
3 changes: 1 addition & 2 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,11 @@ <h1><a href="/#"><span class="ulauncher-logo">{% include ulauncher.svg %}</span>
<div class="container">
<section>
<header>
<h2>Get in touch</h2>
<h2>Feedback</h2>
<span class="byline">Let us know what you think about Ulauncher</span>
</header>
<ul class="contact">
<li><a href="https://twitter.com/UlauncherApp" class="fab fa-twitter"><span>Twitter</span></a></li>
<li><a href="mailto:[email protected]" class="fas fa-envelope"><span>Email</span></a></li>
<li><a href="https://github.com/Ulauncher/Ulauncher/" class="fab fa-github"><span>Github</span></a></li>
</ul>
</section>
Expand Down

0 comments on commit 66cbf80

Please sign in to comment.