Giter Site home page Giter Site logo

curicm / website Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sledilnik/website

0.0 0.0 0.0 26.86 MB

Webpage source for https://covid-19.sledilnik.org

Home Page: https://covid-19.sledilnik.org

License: GNU Affero General Public License v3.0

JavaScript 7.56% HTML 0.36% Vue 11.16% F# 77.90% Dockerfile 0.18% Batchfile 0.02% Shell 0.27% SCSS 0.50% Sass 2.05%

website's Introduction

COVID-19 Sledilnik website

Build Translation status

License

This software is licensed under GNU Affero General Public License.

Structure

folder content
src/assets Static content (images, media files)
src/components Reusable page components
src/content Markdown content for static pages
src/locales Translation resources
src/pages Actual pages of website (each page is one component, StaticPage is reused with different content). Pages are rendered inside App component (in router-view)
src/App.vue Main app component (renders router-view)
src/main.js Webpack entrypoint
.env Configurable values (Page name and description)

Deployment

Overview of current deployments

Deployment is done using GitHub actions in .github/workflows

file about
prod.yml Deploy producition when GitHub release is created
stage.yml Deploy staging on every commit pushed to master
pr.yml Deploy PRs with label deploy-peview
pr-cleanup.yml Undeploy PRs when label is removed or PR closed

Actions consist mostly of 3 jobs, test, build and deploy. Each job depends on previous job (needs keyword in action's YAML). When deploy job finishes, it also sends Slack notification to #devops chanel, and adds comment on PR (if PR build)

Production

Production environment is deployed every time a new GitHub release is created.

Workflow .github/workflows/prod.yml is responsible for deployment.

Staging

Staging environment is deployed on every push to master (if tests pass and build is successful).

Workflow .github/workflows/stage.yml is responsible for deployment.

Use NOBUILD keyworkd in commit message to skip build (and deploy) for this commit (tests will still be ran). Use NODEPLOY keyworkd in commit message to skip deploy for this commit (image will still be build and pushed).

Preview deployment (pull requests)

Create PR from a branch (in this repo, not fork) to master. Label PR with label deploy-preview and wait few minutes. Deployment should be available at https://pr-NUM.preview.sledilnik.org where NUM is number of your PR.

Only open PR with label deploy-preview are deployed. When PR is closed or label removed, deployment is stopped.

Development

What you need

Project setup

yarn install

Compiles and hot-reloads for development

yarn run serve

Compiles and minifies for production

yarn run build

Run your tests

Not really that we have any tests

yarn run test

Lints and fixes files

yarn run lint

FSharpLint

FSharpLint is used to check the F# code. In order to use it, you need to run build.bat script, which will

  1. install FSharpLint locally (if it was not already installed),
  2. run it on the source code,
  3. run F# unit tests.

The configuration is stored in the fsharplint-config.json file. You can find more information on how to configure or suppress various rules here.

Using FSharpLint in Rider

If you use JetBrains Rider as your IDE, you can integrate FSharpLint into your workflow inside IDE by following these steps:

  1. Make sure you have FSharpLint installed (see the above section).
  2. Click File | Settings menu option.
  3. In the Settings window, find Tools/External Tools tree item.
  4. Press on the plus (+) button to add a new external tool.
  5. In the Edit Tool window, enter the following values:
    • Name: FSharpLint
    • Program: dotnet
    • Arguments: fsharplint --format msbuild lint -l fsharplint-config.json SloCovid19Website.sln
    • Advanced Options: check all checkboxes
    • Output filters: $FILE_PATH$\($LINE$\,$COLUMN$\,.*
  6. Press OK button to confirm.

Now you should have a new menu item under Tools | External Tools | FSharpLint.

Resources

website's People

Contributors

3tw avatar b100w11 avatar blonduos avatar breki avatar carlitosyo avatar comradekingu avatar dependabot[bot] avatar drola avatar encalien avatar grofzarkov avatar igzebedze avatar joahim avatar kesma01 avatar luka-medic avatar lukarenko avatar majazaloznik avatar matejmeglic avatar miaerbus avatar milotype avatar mitjapotocin avatar mkadunc avatar multicultivator avatar overlordtm avatar pkese avatar retro65 avatar sabinatamko avatar schnuri-schnuri avatar sebastjancizel avatar stefanb avatar vesterde avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.